mumu 0.11.1

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",
  "dataComponent": "array",
  "heading": {
    "title": "take",
    "badges": ["Array", "PARTIAL"]
  },
  "synopsis": "Returns the first N elements of an array. Partial and placeholder usage supported.",
  "codeBlocks": [
    "extend(\"array\")\n\narr = [5,6,7,8,9]\nsput(array:take(3, arr))\n# => [5,6,7]\n\n# Partial usage:\ntake2 = array:take(2)\nsput(take2(arr))\n# => [5,6]\n\n# Placeholder usage:\np = array:take(_, arr)\nsput(p(4))\n# => [5,6,7,8]"
  ],
  "notes": [
    "First argument: count.",
    "Second argument: array.",
    "Returns a new array with up to count elements from the start.",
    "Partial and placeholder usage supported."
  ]
}