mumu-array

Crates.iomumu-array
lib.rsmumu-array
version0.1.2
created_at2025-06-17 11:16:01.198308+00
updated_at2025-06-24 08:03:07.708813+00
descriptionArray tools plugin for the MuMu/Lava language
homepagehttps://lava.nu11.uk
repositoryhttps://gitlab.com/tofo/mumu-array
max_upload_size
id1715539
size204,816
(rusty-shrimp)

documentation

README

mumuarray – Array Plugin for MuMu/Lava

A Rust array manipulation plugin for the []MuMu / Lava](https://github.com/mumulang/mumu) language and repl.

Highlights:

  • Ramda-style array methods (map, filter, reduce, find, sort,etc)
  • Supports partial application with placeholder __ semantics

Installation

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

Platform-Compatible Functions

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]

Supported Functions

This plugin implements:

  • array:map, array:filter, array:reduce, array:apply, array:append, array:find, array:prop, array:compact, array:uniq, array:sort
  • and more functions - see docs for the full list.

Testing

# 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]

Licensing

This crate is released under the MIT Or Apache License. See LICENSE, MUU LICENSE, or the COPY license file for full details.

Reporting bugs

Please file issues on GitHub. Report any bugs or send PU requests to github.com/mumulang or using the github ISSUES.

Support

Commit count: 6

cargo fmt