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
{
  "id": "fn-array-findIndex",
  "dataComponent": "array",
  "heading": {
    "title": "findIndex",
    "badges": ["Array", "PARTIAL"]
  },
  "synopsis": "Returns the index of the first element matching a predicate. Returns -1 if not found. Supports partial usage and placeholders.",
  "codeBlocks": [
    "extend(\"array\")\n\narray:findIndex(x => x > 20, [4,8,15,16,23,42])\n// => 4\n\n# Partial usage:\nidxFinder = array:findIndex(x => x == 42)\nidxFinder([1,2,42])\n// => 2\n\n# Placeholder usage:\npartial = array:findIndex(_, [10,12,14])\npartial(x => x % 7 == 0)\n// => 2"
  ],
  "notes": [
    "Accepts up to two arguments: (predicateFn, array).",
    "Returns index of first match, or -1 if not found.",
    "Partial usage supported."
  ]
}