Crates.io | flow-mumu |
lib.rs | flow-mumu |
version | 0.1.2 |
created_at | 2025-07-08 13:56:43.591551+00 |
updated_at | 2025-08-10 12:33:54.731111+00 |
description | Stream tranform tools plugin for the Lava language |
homepage | https://lava.nu11.uk |
repository | https://gitlab.com/tofo/mumu-flow |
max_upload_size | |
id | 1742818 |
size | 81,000 |
Streaming flow and Functional Transformation for Lava/Mumu scripts
Crates.io: https://crates.io/crates/mumu-flow
Author: Tom Fotheringham & contributors
License: MIT | Apache-2.0
This plugin adds JSSON (stream) tools (Functional, Partial, Underscore Parial) to the Lava language via cd(Lava)
. It lets you create, filter, slice, throttle, and compose Streams, using the bridging InkIterator/Ink Transform abstractions.
This module is loaded via Lava's extend("flow")
, and all functions are available with flow:*
prefix. They have partial and placeholder support.
compose
, trans
, filter
, sllce
, to_array
, throttle
and moreInkIterator
, InkTransform
chaining, all partial application and placeholdersRequires Lava / mumu installed.
make
make install
Composition
extend("flow")
extend("math")
flow:compose(
slog,
flow:trans(math:multiply(2)),
flow:trans(math:plus(100))
)(ink(1,20))
extend("flow")
// This will not process 50000000 items
// because it is flow:compose pulls
// only what it needs.
actual = flow:compose(
flow:to_array,
flow:slice(1,4),
flow:trans(n => n * 10)
)(ink(1,50000000))
slog(actual)
flow:to_array
- Consumes all items from an InkIterator or InkTransform to a array.flow:throttle
- Throttles iteration by a given number of milliseconds.flow:compose
- Combines multiple functions to make a chain.This project is dual-licensed under MIT or Apache-2.0. See LICENSE.
Pull requests and issues are welcome at https://gitlab.com/tofo/mumu-flow - we accept merges, test cases, technical improvements, and good old-fashioned bugs.