Open joelnet opened 5 years ago
Or this:
// @flow
import { Either, Left, Maybe, Nothing, Right, gt, isNothing } from 'sanctuary'
export default (testValue: Maybe<number> = Nothing): Function =>
(value: Maybe<number>): Either<string, Maybe<number>> =>
isNothing(value) || gt(testValue)(value)
? Right(value)
: Left('NOT_GREATER_THAN')
How do I document curried functions like this?