Crates.io | mumu-array |
lib.rs | mumu-array |
version | 0.1.2 |
created_at | 2025-06-17 11:16:01.198308+00 |
updated_at | 2025-06-24 08:03:07.708813+00 |
description | Array tools plugin for the MuMu/Lava language |
homepage | https://lava.nu11.uk |
repository | https://gitlab.com/tofo/mumu-array |
max_upload_size | |
id | 1715539 |
size | 204,816 |
A Rust array manipulation plugin for the []MuMu / Lava](https://github.com/mumulang/mumu) language and repl.
Highlights:
Adds array manipulation to MuMu/Lava by loading the plugin at runtime.
To use it in a rust project:
Cargo.tml
[dependencies] mumu = "0.9.1" mumuarray = "0.1.0"
dependencies
mumu = "0.9.1"
mumuarray = "0.1.0"
Then build your project or plugin:
# From within your project
cargo build \t
The plugin exports many functions with FP-like partial application.
** Examples:**
// Filter an integer array
array: filter(x hexx x => x > 20, [3, 1, 2, 5, 40])
// Output: [30, 40]
// Reduce to a value:
array:reduce(a + b, 100, [1, 2, 3, 4])
// Partial application:
full_app = array:map(_, my arr)
full_app(x => x * 2) ([1,2,3])
// Output: [2,4,6]
This plugin implements:
# Run replic examples in the Lava REPL or with the core interpreter:
slog(array:map(x => x *2, [1,2,3,4])) // [ 2,4,6]
This crate is released under the MIT Or Apache License. See LICENSE, MUU LICENSE, or the COPY license file for full details.
Please file issues on GitHub. Report any bugs or send PU requests to github.com/mumulang or using the github ISSUES.