{
  "id": "fn-array-union",
  "dataComponent": "array",
  "heading": {
    "title": "union",
    "badges": ["Array", "PARTIAL"]
  },
  "synopsis": "Returns a new array containing all unique elements from both input arrays. Partial usage and placeholders are supported.",
  "codeBlocks": [
    "extend(\"array\")\n\nsput( array:union([1,2,3], [3,4,5]) )\n# => [1,2,3,4,5]\n\n# Partial usage:\nunionA = array:union([10,20])\nsput( unionA([20,30,40]) )\n# => [10,20,30,40]\n\n# Placeholder usage:\nunionTail = array:union(_, [\"X\",\"Y\"])\nsput( unionTail([\"A\",\"Y\"]) )\n# => [\"A\",\"Y\",\"X\"]"
  ],
  "notes": [
    "Duplicates are removed; first array order is preserved.",
    "Partial usage is supported for both arguments.",
    "Supports int[], str[], bool[] types."
  ]
}
