[{"name":"LinearDirection","comment":"\n\n@docs LinearDirection, opposite\n\n","unions":[{"name":"LinearDirection","comment":" Either `FirstToLast` or `LastToFirst`.\nYou might also want to create aliases (e.g. forward and backward)\n","args":[],"cases":[["FirstToLast",[]],["LastToFirst",[]]]}],"aliases":[],"values":[{"name":"opposite","comment":" The other direction. `LastToFirst` ⇆ `FirstToLast`\n","type":"LinearDirection.LinearDirection -> LinearDirection.LinearDirection"}],"binops":[]},{"name":"LinearDirection.Array","comment":" `Array` operations that can be applied in either direction.\n\n@docs fold, take, at, replaceAt, removeAt, insertAt\n\n","unions":[],"aliases":[],"values":[{"name":"at","comment":" `Just` the element at an index in a direction.\n\n    Array.fromList [ \"lose\", \"win\", \"lose\" ]\n        |> Array.at 0 LastToFirst\n    --> Just \"lose\"\n\n    Array.fromList [ 1, 2, 3 ]\n        |> Array.at 0 FirstToLast\n    --> Just \"lose\"\n\n`Nothing`, if the index is out of range.\n\n    Array.fromList [ 1, 2, 3 ]\n        |> Array.at -1\n    --> Nothing\n\n","type":"Basics.Int -> LinearDirection.LinearDirection -> Array.Array a -> Maybe.Maybe a"},{"name":"fold","comment":" Reduce an `Array` in a direction.\n\n    Array.fromList [ \"l\", \"i\", \"v\", \"e\" ]\n        |> Array.fold FirstToLast (++) \"\"\n    --> \"live\"\n\n    Array.fromList [ \"l\", \"i\", \"v\", \"e\" ]\n        |> Array.fold LastToFirst (++) \"\"\n    --> \"evil\"\n\n","type":"LinearDirection.LinearDirection -> (element -> result -> result) -> result -> Array.Array element -> result"},{"name":"insertAt","comment":" Put an element in an `Array` at a given index in a direction.\n\n    Array.fromList [ 'a', 'c', 'd' ]\n        |> Array.insertAt 1 FirstToLast 'b'\n    --> Array.fromList [ 'a', 'b', 'c', 'd' ]\n    Array.fromList [ 'a', 'c', 'd' ]\n        |> Array.insertAt 2 LastToFirst 'b'\n    --> Array.fromList [ 'a', 'b', 'c', 'd' ]\n\nIf the index is out of bounds, nothing gets inserted.\n\n    Array.fromList [ 'a', 'c', 'd' ]\n        |> Array.insertAt -1 'b'\n    --> Array.fromList [ 'a', 'c', 'd' ]\n    Array.fromList [ 'a', 'c', 'd' ]\n        |> Array.insertAt 10 'b'\n    --> Array.fromList [ 'a', 'c', 'd' ]\n\n","type":"Basics.Int -> LinearDirection.LinearDirection -> a -> Array.Array a -> Array.Array a"},{"name":"removeAt","comment":" Kick an element out of an `Array` at a given index in a direction.\n\n    Array.fromList [ 'a', 'a', 'b' ]\n        |> Array.removeAt 1 FirstToLast\n    --> Array.fromList [ 'a', 'b', 'c', 'd' ]\n    Array.fromList [ 'a', 'b', 'c', 'd' ]\n        |> Array.removeAt 0 LastToFirst\n    --> Array.fromList [ 'a', 'b', 'c' ]\n\nIf the index is out of bounds, the `Array` is unaltered.\n\n    Array.fromList [ 'a', 'a', 'b' ]\n        |> Array.removeAt -1 FirstToLast\n    --> Array.fromList [ 'a', 'a', 'b' ]\n\n","type":"Basics.Int -> LinearDirection.LinearDirection -> Array.Array a -> Array.Array a"},{"name":"replaceAt","comment":" Set the element at an index in a direction.\n\n    Array.fromList [ \"I\", \"am\", \"ok\" ]\n        |> Array.replaceAt 2 FirstToLast \"confusion\"\n    --> Array.fromList [ \"I\", \"am\", \"confusion\" ]\n\n    Array.fromList [ \"I\", \"am\", \"ok\" ]\n        |> Array.replaceAt 1 LastToFirst \"feel\"\n    --> Array.fromList [ \"I\", \"feel\", \"ok\" ]\n\nIf the index is out of range, the array is unaltered.\n\n    Array.fromList [ \"I\", \"am\", \"ok\" ]\n        |> Array.replaceAt -1 FirstToLast \"is\"\n    --> Array.fromList [ \"I\", \"am\", \"ok\" ]\n\n","type":"Basics.Int -> LinearDirection.LinearDirection -> element -> Array.Array element -> Array.Array element"},{"name":"take","comment":" A certain number of elements from one side.\n\n    Array.fromList [ 1, 2, 3, 4, 5, 6 ]\n        |> Array.take 4 FirstToLast\n        |> Array.take 2 LastToFirst\n    --> Array.fromList [ 3, 4 ]\n\n    Array.fromList [ 1, 2, 3 ]\n        |> Array.take 100\n    --> Array.fromList [ 1, 2, 3 ]\n\n","type":"Basics.Int -> LinearDirection.LinearDirection -> Array.Array a -> Array.Array a"}],"binops":[]}]