fvilante / NextRobot

The next robot framework
0 stars 0 forks source link

Refactor Maybe monad #3

Open fvilante opened 4 years ago

fvilante commented 4 years ago
  1. Put maybe monad in the new pattern format (like: Either, Future etc)
  2. Make 'Nothing' of MaybeMatcherFn, to be a function and not a plain value, ie:

const a = maybe.match({
    Nothing: () => default,
    Just: value => value,
})