flow-mumu

Crates.ioflow-mumu
lib.rsflow-mumu
version0.1.2
created_at2025-07-08 13:56:43.591551+00
updated_at2025-08-10 12:33:54.731111+00
descriptionStream tranform tools plugin for the Lava language
homepagehttps://lava.nu11.uk
repositoryhttps://gitlab.com/tofo/mumu-flow
max_upload_size
id1742818
size81,000
(justifiedmumu)

documentation

README

Lava Flow | Streaming & transforms for Lava

Streaming flow and Functional Transformation for Lava/Mumu scripts

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.

Key Features

  • Functions: compose, trans, filter, sllce , to_array, throttle and more
  • Support for InkIterator, InkTransform chaining, all partial application and placeholders
  • Full doc: https://lava.nu11.uk/#flow

installation

Requires 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)

Other important functions

  • 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.

Licensing

This project is dual-licensed under MIT or Apache-2.0. See LICENSE.

Contributing

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.

Commit count: 0

cargo fmt