Skip to content

Latest commit

 

History

History
10 lines (5 loc) · 845 Bytes

README.md

File metadata and controls

10 lines (5 loc) · 845 Bytes

Transducers in Lua

Transducers are "composable algorithmic transformations." If you don't know yet what transducers are, there are a few good explanations in this Stack Overflow question.

This is a fairly straightforward implementation of transducers in Lua, but the implementation is not comprehensive. There are many more transducers and transformers that could be implemented. In addition, I only generalize transducers for tables and strings.

I follow, roughly, the transformer protocol outlined in transducers-js.

To run the examples, simply run lua sample.lua -- I used Lua 5.2.3, but any other Lua implementation should work as well.