JSMonk / sweet-monads

The library which provides useful monads, interfaces, and lazy iterators.
MIT License
343 stars 22 forks source link

`chain` operator name #51

Open konradekk opened 1 year ago

konradekk commented 1 year ago

I guess that the chain operator name is pretty well-established, both here and outside the project. Iʼm thinking of possibility to alias it to flatMap, so it would align slightly better with JS API for arrays etc.

See also similar issue with discussion elsewhere.

(Iʼm more used to of instead from for bind operator but thatʼs not a case with JS API.)

JSMonk commented 1 year ago

Hey @konradekk. Thank you for the issue. I think, I could add an alias too for the chain method to Either and Maybe monads (but not in the Monad interface, because it will break compatibility).