Basic tools for composing functions, to write simpler and safer programs in PHP 5.4+. Heavily inspired by @drboolean's book, the Ramda library, and the Fantasy Land JS project.
This library grew out of frustration with old PHP code I have to maintain. I'm convinced that functional programming can lead us Out of the Tar Pit. I do know about Phamda and Pramda; very cool projects, but they both require PHP 5.6+. Then, I was also not 100% on board with some design choices those 2 make. I'd like to keep fyr-fyr-fyr tiny and lean, away from all sorts of cruft and magic. In many ways that's a matter of taste though.
(f⋅g⋅h)(x) <-> f(g(h(x)))
f(x, y) <-> f(x)(y)
flip
map
chain
reduce
converge
assoc
assocPath
fromPairs
merge
mergeAll
pick
pickAll
prop
propOr
append
indexBy
minBy
add
always
identity
inc
IO
Maybe
Not yet ready for using in production