Currying interview questions
Practice 6 questions on currying. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
6 questions
- MEDIUM
Curry
Implement a function that transforms a multi-argument function into a chain of single-argument calls.
25 minJavaScript - MEDIUM
Curry II
Implement a flexible curry where each call can supply any number of arguments until the original arity is reached.
25 minJavaScript - MEDIUM
Curry IV
PREMIUMExtend curry with placeholder support, so arguments can be supplied in any position across calls.
40 minJavaScript - MEDIUM
partial
Implement partial and partialRight — pre-fill some of a function's arguments, with placeholder support.
25 minJavaScript - MEDIUM
Sum
Implement a curried sum function that accepts numbers one call at a time and returns the running total when invoked with none.
25 minJavaScript - HARD
Curry III
PREMIUMImplement a curry helper that turns a variadic function into one that can be called repeatedly with any number of arguments.
40 minJavaScript