2. implement curry() with placeholder support

medium  - accepted / - tried

This is a follow-up on 1. implement curry()

please implement curry() which also supports placeholder.

Here is an example

const  join = (a, b, c) => {   return `${a}_${b}_${c}`}const curriedJoin = curry(join)const _ = curry.placeholdercurriedJoin(1, 2, 3) // '1_2_3'curriedJoin(_, 2)(1, 3) // '1_2_3'curriedJoin(_, _, _)(1)(_, 3)(2) // '1_2_3'

more to read

https://javascript.info/currying-partials

https://lodash.com/docs/4.17.15#curry

https://github.com/planttheidea/curriable

Related Problems

1. implement curry()

Related Lists

lodash

Always try to find a better approach.

(206)