The goal of this project is to implement a Python version of Racket’s for comprehensions. The for_fold function simulates the behavior of Racket’s for/fold, including handling multiple accumulators, applying filters, and producing custom results. It’s all about bringing the expressive power of Racket into Python, while keeping things simple and elegant. ✨
This project leverages Python 3.11+ for the latest language features (like structural pattern matching) and uses cytoolz for its functional programming utilities. ⚡
- 🔄 Multiple accumulators over multiple iterables, just like in Racket!
- 🔍 Optional filtering using a when clause to add logic to the loop.
- 🎨 Flexible result expressions via a *result clause, so you can control the final output.
- 📝 Typed for clarity, taking advantage of Python’s powerful typing system.
🚧 Coming soon! 🚧