docsbydoxdox / doxdox

📘 JSDoc to Markdown, Bootstrap, and custom JavaScript template documentation generator.
https://doxdox.org
MIT License
160 stars 18 forks source link

How to document curried functions? #73

Open joelnet opened 5 years ago

joelnet commented 5 years ago

How do I document curried functions like this?

const map = func => iterable => {}
chasm commented 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')