{
  "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."
  ]
}
