f-streams

Yet another streams library for Lua.

$ luarocks install f-streams

`f-streams` is yet another streams library for Lua.

A stream is simply a function or any value with a `__call` metamethod.

A stream produces a new value each time is called.
When a stream returns `nil`, it indicates its termination.
Then, all subsequent calls to the stream must also return `nil`.

Streams can be combined with other streams or values to create new streams.

`TODO: finalization`

Streams are compatible with the generic [for](lua-for) loop of Lua, including
proper finalization when the loop ends.

Versions

0.1-12 days ago(revision: 3)0 downloads

Dependencies

lua ~> 5.4

Manifests