mumu 0.11.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
{
  "id": "fn-array-collect",
  "dataComponent": "array",
  "heading": {
    "title": "collect",
    "badges": ["Array"]
  },
  "synopsis": "Collects all items from an InkIterator into a MixedArray, or returns the array unchanged if already an array.",
  "codeBlocks": [
    "extend(\"array\")\n\niter = ink(1, 4)\narr = array:collect(iter)\nsput(arr)\n// => [1,2,3]\n\n# If given an array, just returns it:\nsput(array:collect([7,8]))\n// => [7,8]"
  ],
  "notes": [
    "Takes one argument: an InkIterator or an array.",
    "Returns a MixedArray of all items, or the original array.",
    "If used on an InkIterator, all items are collected eagerly."
  ]
}