Skip to content

Releases: dana-ross/functional-programming-utils

PSR-2 and some housekeeping

23 May 19:04
Compare
Choose a tag to compare
  • PSR-2 compliance from PHPCS. This includes moving Monad classes into their own files. Props to @italeks for bringing this to my attention.
  • .editorconfig for PSR-2 compliant formatting
  • Updates to the README
  • Scrutinizer CI integration

Monads, mo problems

30 Jan 16:54
Compare
Choose a tag to compare

I originally wrote this library while reading a book about functional programming. This book referred to things like Just and Maybe as "functors". While technically correct, the more common term for them is Monads so I've renamed the base class & updated the docs. If you use the implementation classes directly, you shouldn't have to change any code. If you inherit from Functor, you'll need to update your class to extend Monad instead.

Now I'm hungry for curry

16 Dec 23:15
Compare
Choose a tag to compare

Eric Elliott posted an article that opened my eyes to the difference between partial application and currying. It also made me aware that curry() and curry_right() should more accurately be named partially_apply() and partially_apply_right().

curry() now works like a real curry by returning a function that only takes a single parameter, and continuing to accept single parameters until all the parameters have been satisfied.

Initial release

18 Aug 13:34
Compare
Choose a tag to compare

Initial release