6 kyu
Combinator Flip
3,393 of 3,427JTipp
Description:
Create a combinator function named flip that takes a function as an argument and returns that function with it's arguments reversed.
For example:
flip(print)(4,5) // returns "5 -> 4"
function print(a,b) {
return a + " -> " + b;
}
The idea is to reverse any number of arguments using a higher order function, without any concern for the function being passed into it.
Functional Programming
Fundamentals
Similar Kata:
Stats:
Created | Sep 18, 2014 |
Published | Sep 18, 2014 |
Warriors Trained | 4371 |
Total Skips | 241 |
Total Code Submissions | 10701 |
Total Times Completed | 3427 |
JavaScript Completions | 3393 |
CoffeeScript Completions | 54 |
Total Stars | 33 |
% of votes with a positive feedback rating | 91% of 164 |
Total "Very Satisfied" Votes | 139 |
Total "Somewhat Satisfied" Votes | 19 |
Total "Not Satisfied" Votes | 6 |