doxdox
doxdox copied to clipboard
How to document curried functions?
How do I document curried functions like this?
const map = func => iterable => {}
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')