mumu 0.10.0

Lava Mumu is a language for those in the now and that know
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "id": "fn-array-take_while",
  "dataComponent": "array",
  "heading": {
    "title": "take_while",
    "badges": ["Array", "PARTIAL"]
  },
  "synopsis": "Returns the longest prefix of the array for which the predicate returns true. Partial and placeholder usage supported.",
  "codeBlocks": [
    "extend(\"array\")\n\narr = [2,4,6,7,8]\nsput(array:take_while(x => x % 2 == 0, arr))\n# => [2,4,6]\n\n# Partial usage:\ntw = array:take_while(x => x < 7)\nsput(tw(arr))\n# => [2,4,6]\n\n# Placeholder usage:\np = array:take_while(_, arr)\nsput(p(x => x < 8))\n# => [2,4,6,7]"
  ],
  "notes": [
    "First argument: predicate function.",
    "Second argument: array.",
    "Returns a new array of consecutive elements for which predicate returns true.",
    "Partial and placeholder usage supported."
  ]
}