jasonkuhrt-archive / maybe

Correct implementation of the Maybe monad in JavaScript
1 stars 0 forks source link

Curry the api #5

Open jasonkuhrt opened 10 years ago

jasonkuhrt commented 10 years ago

A previous attempt revealed a conflict between having a curried api and partially applying it for chaining:

var thing_or_what =  Maybe(2).maybe('whhhhat?')
thing_or_what(console.log); //-- should be 2 but fails