Over the last few weeks, I've been following Advent of Code 2021, using Functional PHP as an approach. It's been a fun and educational process, at least for me and apparently for a few other people, at least given how popular the articles have been.
For reference, the full list of articles in this series is here:
- Day 1: Function composition, pipes, and partial application.
- Day 2: Map, reduce, generators, immutable objects, and with-er methods.
- Day 3: Recursion, memoization, and bits.
- Day 4: First, head, array flattening, and handling state.
- Day 5: Zip and nested pipes.
- Day 6: Efficiency and dealing with infinite streams.
- Day 7: Functional means and medians
- Day 8: Encoding, decoding, and the value of first-class function thinking.
- Day 9: More fun with recursion.
- Day 10: Reduction and recursion, and how to swap between them.
After letting those sit for a few days, I want to use those examples as a way to evaluate how well PHP handles functional-style programming and what improvements we could make to the language to make it even better.
Continue reading this post on PeakD.