array-mumu 0.2.0-rc.5

Array tools plugin for the Mumu ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extend("array")

keyed = [ name:"Alice" ]

// Direct usage
slog( array:assoc("city", "London", keyed) ) // => [ name:"Alice", city:"London" ]

// Partial usage
setter = array:assoc("color", "blue")
slog( setter(keyed) ) // => [ name:"Alice", color:"blue" ]

// Placeholder usage
bananaSetter = array:assoc(_, "banana", keyed)
slog( bananaSetter("fruit") ) // => [ name:"Alice", fruit:"banana" ]