{
  "id": "fn-flow-slice",
  "dataComponent": "flow",
  "heading": {
    "title": "slice",
    "badges": [
      "Flow",
      "PARTIAL"
    ]
  },
  "synopsis": "Returns an InkTransform that skips a certain number of items and then yields a limited count of items from an InkIterator or InkTransform.",
  "codeBlocks": [
    "extend(\"flow\")\n\n# Example => skip=1, count=4 from an ink(1..50)\npartialChain = flow:compose(\n  flow:to_array,\n  flow:slice(1,4),\n  flow:trans(n => n * 10)\n)\n\n# So the data => ink(1,50) => [1,2,3,4,5,...]\n# => trans(n => n*10) => [10,20,30,40,50,...]\n# => slice(1,4) => skip the first => yield next 4 => [20,30,40,50]\n# => flow:to_array => finalize => int_array\n\nresult = partialChain( ink(1,50) )\nsput(result)\n# => [20,30,40,50]\n\n# Partial usage => placeholders, or only skip & count known, waiting for the source.\n"
  ],
  "notes": [
    "Accepts up to three arguments => (skip, count, source). If some are placeholders, returns partial usage. If all are resolved, yields an InkTransform that reads from the given source (an InkIterator or InkTransform).",
    "skip is how many items to discard first, count is how many items to produce next, ignoring the rest. Once count items are produced, iteration returns 'NO_MORE_DATA'.",
    "If skip or count is negative, it’s treated as 0 in some bridging logic, or yields an error in others, depending on your environment."
  ]
}
