Pregunta de entrevista de Honestbee

How to implement a function that dose this: add(a)(b) = a + b

Respuestas de entrevistas

Anónimo

10 jun 2018

function add(a) { return b => a + b }

Anónimo

29 jul 2018

function add(a){ a=a||0; return function(b){ b = b || 0; return a + b; } }