pico-lambda icon indicating copy to clipboard operation
pico-lambda copied to clipboard

Shouldn't lambdas be unary?

Open lhorie opened this issue 8 years ago • 3 comments

e.g. map(parseInt) does funky things due to argument distribution

lhorie avatar Nov 07 '17 18:11 lhorie

Yep! Very true! They should be. We should look into this!

I think one of the reasons why we didn't do this previously is that we ran into an issue with forcing the unary design and keeping the functions "curryable", but only because of the current architecture . So with some refactoring this is totally possible, and I believe worth doing.

MattMcFarland avatar Nov 08 '17 14:11 MattMcFarland

You could write _ => parseInt(_,10) or use partial application...

wshager avatar Nov 12 '17 18:11 wshager

@MattMcFarland I agree let's look into to this.

ronnross avatar Nov 12 '17 19:11 ronnross