6 kyu
Combinator Flip
3,616 of 3,650JTipp
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 | 4608 |
Total Skips | 241 |
Total Code Submissions | 11037 |
Total Times Completed | 3650 |
JavaScript Completions | 3616 |
CoffeeScript Completions | 54 |
Total Stars | 33 |
% of votes with a positive feedback rating | 90% of 168 |
Total "Very Satisfied" Votes | 142 |
Total "Somewhat Satisfied" Votes | 20 |
Total "Not Satisfied" Votes | 6 |