7 kyu
Functional Addition
9,542 of 18,700amrdraz
Description:
Create a function add(n)
/Add(n)
which returns a function that always adds n to any number
Note for Java: the return type and methods have not been provided to make it a bit more challenging.
var addOne = add(1);
addOne(3); // 4
var addThree = add(3);
addThree(3); // 6
Functional Programming
Fundamentals
Similar Kata:
Stats:
Created | May 30, 2014 |
Published | May 30, 2014 |
Warriors Trained | 31787 |
Total Skips | 2843 |
Total Code Submissions | 39229 |
Total Times Completed | 18700 |
JavaScript Completions | 9542 |
CoffeeScript Completions | 230 |
Python Completions | 4656 |
Haskell Completions | 650 |
F# Completions | 230 |
Swift Completions | 1387 |
C# Completions | 487 |
Java Completions | 1233 |
Go Completions | 1170 |
Elixir Completions | 67 |
OCaml Completions | 20 |
Total Stars | 238 |
% of votes with a positive feedback rating | 86% of 1722 |
Total "Very Satisfied" Votes | 1341 |
Total "Somewhat Satisfied" Votes | 290 |
Total "Not Satisfied" Votes | 91 |