array-mumu-0.1.10 has been yanked.
array-mumu – Array plugin for the Mumu ecosytem
- Supports partial application with placeholder __ semantics
Installation
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:append", "array:apply", "array:assoc", "array:chunk", "array:collect", "array:compact", "array:drop", "array:dropWhile", "array:each", "array:every", "array:filter", "array:find", "array:findIndex", "array:flatten", "array:flattenDeep", "array:group_by", "array:head", "array:includes", "array:init", "array:join", "array:last", "array:length", "array:map", "array:multi_concat", "array:multi_difference", "array:multi_intersection", "array:multi_union", "array:multi_zip", "array:multi_zipWith", "array:nth", "array:partition", "array:pluck", "array:prop", "array:prop_partial", "array:range", "array:reduce", "array:repeat", "array:reverse", "array:shuffle", "array:slice", "array:some", "array:sort", "array:sortBy", "array:sortWith", "array:tail", "array:take", "array:takeWhile", "array:uniq", "array:zip", "array:zipWith"]
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
- Crated by Tom Fotheringham
- API and ISSUES: https://gitlab.com/tofo/mumu-array
- Contibutions welcome