7 kyu
Zip it!
406 of 1,004joh_pot
Description:
Write
lstzip
that merges the corresponding elements of two sequences using a specified selector function fn
(a block
in Ruby)
For example:
a = [1, 2, 3, 4, 5]
b = ['a', 'b']
lstzip(a,b, lambda a,b: str(a)+str(b))
a = [1, 2, 3, 4, 5]
b = ['a','b','c','d','e']
lstzip(a,b, lambda a, b: a * ord(b[0]))
if arrays have different lengths, go up to the minimum length and then stop.
Arrays
Fundamentals
Similar Kata:
Stats:
Created | Jan 29, 2016 |
Published | Jan 29, 2016 |
Warriors Trained | 2039 |
Total Skips | 143 |
Total Code Submissions | 3583 |
Total Times Completed | 1004 |
JavaScript Completions | 434 |
Ruby Completions | 87 |
Python Completions | 406 |
C# Completions | 76 |
C Completions | 72 |
Total Stars | 31 |
% of votes with a positive feedback rating | 90% of 252 |
Total "Very Satisfied" Votes | 214 |
Total "Somewhat Satisfied" Votes | 28 |
Total "Not Satisfied" Votes | 10 |
Total Rank Assessments | 11 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |