[{"name":"N","comment":" Natural numbers within a typed range.\n\n@docs N\n\n\n# bounds\n\n@docs In, Min, NoMax, Exactly\n\n\n# create\n\n@docs abs, random, until, up\n\n\n# specific numbers\n\nIf the package exposed every number 0 → 1000, [tools can become unusably slow](https://github.com/lue-bird/elm-typesafe-array/issues/2).\n\nSo only 0 → 16 are exposed, while larger numbers have to be generated locally.\n\nCurrent method: [generate them](https://lue-bird.github.io/elm-bounded-nat/generate/) into a `module exposing (n500, N500, Add500, ...)` + `import as N exposing (n500, ...)`\n\nIn the future, [`elm-generate`](https://github.com/lue-bird/generate-elm) will allow auto-generating via [`elm-review`](https://dark.elm.dmy.fr/packages/jfmengels/elm-review/latest/).\n\n\n## type `n`\n\n[⏭ skip to last](#N16)\n\n@docs N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13, N14, N15, N16\n\n\n## type `n +`\n\n[⏭ skip to last](#Add16)\n\n@docs N0able, Add1, Add2, Add3, Add4, Add5, Add6, Add7, Add8, Add9, Add10, Add11, Add12, Add13, Add14, Add15, Add16\n\n\n## exact\n\n[⏭ skip to last](#n16)\n\n@docs n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14, n15, n16\n\n\n## compare\n\n@docs BelowOrAbove\n\n\n### int clamp\n\n@docs intAtLeast, intIn\n\n\n## int compare\n\n@docs intIsIn, intIsAtLeast\n\n\n## clamp\n\n@docs atLeast, atMost\n\n\n## compare maximum constrained\n\n@docs is, isIn, isAtLeast, isAtMost\n\n\n# alter\n\n@docs add, addIn\n@docs sub, subIn\n@docs toPower, remainderBy, mul, div\n\n\n## alter maximum unconstrained\n\n@docs minSub, minAdd, minSubAtMost, addAtLeast\n\n\n## broaden\n\n@docs toInt, toFloat\n\n\n# type information\n\n@docs minDown, noDiff, noMax, maxOpen, maxUp\n\n\n# miss operation x?\n\nAnything that can't be expressed with the available operations? → issue/PR\n\n\n# internals\n\nUseful for fancy things – building structures like [`typesafe-array`](https://dark.elm.dmy.fr/packages/lue-bird/elm-typesafe-array/latest/)\n\nWhile the internally stored `Int` isn't directly guaranteed to be in bounds by elm,\n[`minimum`](#minimum), maximum, [`differences`](#differences)\nmust be built as actual values checked by the compiler.\n\n@docs Is, Diff, To\n@docs diffAdd, diffSub\n@docs maximumUnknown\n\n@docs minimum\n@docs difference0, difference1, differences\n@docs addDifference, subDifference\n@docs differenceAdd, differenceSub\n\n","unions":[{"name":"BelowOrAbove","comment":" The error result of comparing [`N`](#N)s.\n\n  - `Above`: greater\n  - `Below`: less\n\nValues exist for each condition.\n\n","args":["below","above"],"cases":[["Below",["below"]],["Above",["above"]]]},{"name":"Diff","comment":" `Diff low To high`: an exact number as the difference `high - low`.\n\n    In\n        N5\n        (Add5 a_)\n        (Is\n            (Diff myAge To sistersAge)\n            (Diff mothersAge To fathersAge)\n        )\n\n  - `myAge + 5 = sistersAge`\n  - `mothersAge + 5 = fathersAge`\n\n","args":["low","toTag","high"],"cases":[["Difference",["{ add : low -> high, sub : high -> low }"]]]},{"name":"N0able","comment":" Base type of [`N0`](#N0), [`Add1 n`](#Add1) following [`allowable-state`](https://dark.elm.dmy.fr/packages/lue-bird/elm-allowable-state/latest/):\n\nIs the parameter `possiblyOrNever` set to `Never` like in\n\n    type alias Add1 n =\n        N0able n Never\n\n`N0` is impossible to construct.\n\nIs the parameter `possiblyOrNever` set to `Possibly` like in\n\n    type alias N0 =\n        N0able Never Possibly\n\n`N0` is a possible value.\n\n","args":["successor","possiblyOrNever"],"cases":[["N0",["possiblyOrNever"]],["Add1",["successor"]]]},{"name":"To","comment":" Just a word in the [type `Diff`](#Diff).\n\n    Diff low To high\n\n→ distance `high - low`.\n\n","args":[],"cases":[]}],"aliases":[{"name":"Add1","comment":" Type for the natural number `1 +` some natural number `n`\n","args":["n"],"type":"N.N0able n Basics.Never"},{"name":"Add10","comment":" Type for the natural number `10 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add11","comment":" Type for the natural number `11 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add12","comment":" Type for the natural number `12 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add13","comment":" Type for the natural number `13 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add14","comment":" Type for the natural number `14 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add15","comment":" Type for the natural number `15 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add16","comment":" Type for the natural number `16 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add2","comment":" Type for the natural number `2 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able n Basics.Never) Basics.Never"},{"name":"Add3","comment":" Type for the natural number `3 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never"},{"name":"Add4","comment":" Type for the natural number `4 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add5","comment":" Type for the natural number `5 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add6","comment":" Type for the natural number `6 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add7","comment":" Type for the natural number `7 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add8","comment":" Type for the natural number `8 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Add9","comment":" Type for the natural number `9 +` some natural number `n`\n","args":["n"],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able n Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"Exactly","comment":" Allow only a specific number.\n\nUseful as a **stored & argument** type in combination with [`typesafe-array`](https://package.elm-lang.org/packages/lue-bird/elm-typesafe-array/latest/)s,\nnot with [`N`](#N)s.\n\n    byte : Arr (Exactly N8) Bit -> Byte\n\n→ A given [`Arr`](https://package.elm-lang.org/packages/lue-bird/elm-typesafe-array/latest/) must have _exactly 8_ `Bit`s.\n\n    type alias TicTacToeBoard =\n        Arr\n            (Exactly N3)\n            (Arr (Exactly N3) TicTacToField)\n\n→ A given [`Arr`](https://package.elm-lang.org/packages/lue-bird/elm-typesafe-array/latest/) must have _exactly 3 by 3_ `TicTacToeField`s.\n\n","args":["n"],"type":"N.In n n {}"},{"name":"In","comment":" somewhere within a `minimum` & `maximum`\n\n       ↓ minimum   ↓ maximum\n    ⨯ [✓ ✓ ✓ ✓ ✓ ✓ ✓] ⨯ ⨯ ⨯...\n\n\n### `In minimum maximum difference_`\n\nFor arguments\n\n    percent : N (In min_ N100 difference_) -> Percent\n\n→ `min ≤ N100`\n\nIf you want a number where you just care about the minimum, leave the `max` as a type _variable_.\n\n       ↓ minimum    ↓ maximum or  →\n    ⨯ [✓ ✓ ✓ ✓ ✓ ✓ ✓...\n\nAny natural number:\n\n    N (In min_ max_ difference_)\n\nA number, at least 5:\n\n    N (In (Add5 minMinus5_) max_ difference_)\n\n  - `max_` could be a specific maximum or [no maximum at all](#NoMax)\n\n  - `difference_` could contain extra information if the argument is a [specific](#Is) number\n    like [`n0`](#n0), [`n1`](#n1), ...\n\n\n### `In minimum maximum {}`\n\nA number somewhere within a `minimum` & `maximum`. We don't know it exactly, though\n\n       ↓ minimum   ↓ maximum\n    ⨯ [✓ ✓ ✓ ✓ ✓ ✓ ✓] ⨯ ⨯ ⨯...\n\nDo **not** use it as an argument type.\n\nA number between 3 and 5\n\n    N (In N3 (Add5 a_) {})\n\n","args":["minimum","maximum","possibleRepresentationAsDifferences"],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { min : minimum, max : () -> maximum, diff : possibleRepresentationAsDifferences }"},{"name":"Is","comment":" Associated [difference](#Diff)s.\n","args":["difference0","difference1"],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { diff0 : difference0, diff1 : difference1 }"},{"name":"Min","comment":" Only **stored / result types should be `Min`**.\n\nSometimes, you simply cannot compute a maximum.\n\n    abs : Int -> N (In N0 ?? {})\n                    ↓\n    abs : Int -> N (Min N0)\n\nA number `≥ 5` for example:\n\n    N (Min N5)\n\nEvery `Min min` is of type `In min ...`.\n\n","args":["lowestPossibleValue"],"type":"N.In lowestPossibleValue N.NoMax {}"},{"name":"N","comment":" A **bounded** natural number `>= 0`\n\n\n### argument type\n\n    -- ≥ 0, else any limitations allowed\n    N range_\n\n    -- ≥ 4\n    N (In (Add4 minMinus4_) max_ difference_)\n\n    -- 4 ≤ n ≤ 15\n    N (In (Add4 minMinus4_) N15 difference_)\n\n`In (Add4 minMinus4_) N15` says:\n\n  - the minimum-constraint can be `4`|`5`|`6`|...\n  - any maximum-constraint greater than `15` is forbidden\n  - specific numbers like [`n0`](#n0), [`n1`](#n1), ... which carry [`difference_`](#Is)s are allowed\n\n\n### result type\n\n    -- ≥ 4\n    N (Min N4)\n\n    -- 2 ≤ n ≤ 12\n    N (In N2 (Add12 a_) {})\n\n`In N2 (Add12 a_) {}` says:\n\n  - the minimum-constraint can be `4`|`5`|`6`|...\n  - any maximum-constraint greater than `15` is forbidden\n  - `{}`: no [differences](#Is) are attached.\n    Only specific numbers like [`n0`](#n0), [`n1`](#n1), ... carry [differences](#Is)s\n\n\n### stored type\n\nwhat to put in declared types like `Model`\n\n    -- ≥ 4\n    N (Min N4)\n\n    -- 2 ≤ n ≤ 12\n    N (In N2 N12 {})\n\nThey are like [result types](#result-type) but without type variables.\n\n\n### specific number\n\nNumbers [`n0`](#n0), [`n1`](#n1), ... supplied by this library.\n\nThe type [`Is`](#Is) `(`[`Diff x0 To nPlusX0`](#Diff)`) ...`\nenables adding, subtracting `N<x>` types.\nConsider the type an implementation detail.\nYou can come back to [understand them later](#internals).\n\n    n3 :\n        N\n            (In\n                N3\n                (Add3 atLeast_)\n                (Is\n                    (Diff x0 To (Add3 x0))\n                    (Diff x1 To (Add3 x1))\n                )\n            )\n\n    -- a number nTo15 away from 15\n    N (In n nAtLeast_ (Is (Diff nTo15 To N15) diff1_))\n\n","args":["range"],"type":"N.Internal.N range"},{"name":"N0","comment":" Type for the exact natural number `0`\n","args":[],"type":"N.N0able Basics.Never Possibly.Possibly"},{"name":"N1","comment":" Type for the exact natural number `1`\n","args":[],"type":"N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never"},{"name":"N10","comment":" Type for the exact natural number `10`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N11","comment":" Type for the exact natural number `11`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N12","comment":" Type for the exact natural number `12`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N13","comment":" Type for the exact natural number `13`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N14","comment":" Type for the exact natural number `14`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N15","comment":" Type for the exact natural number `15`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N16","comment":" Type for the exact natural number `16`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N2","comment":" Type for the exact natural number `2`\n","args":[],"type":"N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never"},{"name":"N3","comment":" Type for the exact natural number `3`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never"},{"name":"N4","comment":" Type for the exact natural number `4`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N5","comment":" Type for the exact natural number `5`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N6","comment":" Type for the exact natural number `6`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N7","comment":" Type for the exact natural number `7`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N8","comment":" Type for the exact natural number `8`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"N9","comment":" Type for the exact natural number `9`\n","args":[],"type":"N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able (N.N0able Basics.Never Possibly.Possibly) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never) Basics.Never"},{"name":"NoMax","comment":" Flag \"The number's maximum limit is unknown\".\n\n    type alias Min min =\n        In minimum NoMax {}\n\nis the definition of [`Min`](#Min).\n\nAn example where this is useful using [typesafe-array](https://package.elm-lang.org/packages/lue-bird/elm-typesafe-array/latest/):\n\n    type Tree childCountMax element\n        = Tree\n            element\n            (Arr\n                (In N0 childCountMax {})\n                (Maybe (Tree childCountMax element))\n            )\n\n    type alias TreeBinary element =\n        Tree N2 element\n\n    type alias TreeMulti element =\n        Tree NoMax element\n\nRemember: ↑ and other [`Min`](#Min)/[`NoMax`](#NoMax) are result/stored types, not argument types.\nYou can just use a variable `Tree childCountMax_ element` if you don't care about an enforced maximum.\n\n","args":[],"type":"N.Internal.NoMax"}],"values":[{"name":"abs","comment":" The absolute value of an `Int` → `≥ 0`\n\n    -4 |> N.abs |> N.toInt --> 4\n\n    16 |> N.abs |> N.toInt --> 16\n\nReally only use this if you want the absolute value.\n\n    badLength =\n        List.length >> N.abs\n\n  - maybe, there's a solution that never even theoretically deals with unexpected values:\n\n        mostCorrectLength =\n            List.foldl\n                (\\_ -> N.minAdd n1 >> N.minDown n0)\n                (n0 |> N.noMax)\n\n  - other times, though, like with `Array.length`, which isn't `O(n)`,\n    you can escape with for example\n\n        arrayLength =\n            Array.length >> N.intAtLeast n0\n\n","type":"Basics.Int -> N.N (N.Min N.N0)"},{"name":"add","comment":" Add a given specific [`N (In ... (Is ...))`](#Is).\n\n    between70And100 |> N.add n7\n    --: N (In N77 (Add107 a_) {})\n\nUse [`addIn`](#addIn) if you want to add an [`N`](#N) that isn't a [`N (In ... (Is ...))`](#Is).\n\n","type":"N.N (N.In added_ addedAtLeast_ (N.Is (N.Diff min N.To sumMin) (N.Diff max N.To sumMax))) -> N.N (N.In min max difference_) -> N.N (N.In sumMin sumMax {})"},{"name":"addAtLeast","comment":" To the [`N`](#N) without a known maximum-constraint,,\nadd an [`N`](#N). The second argument is the minimum added value.\n\n    atLeast5 |> N.addAtLeast n2 atLeast2\n    --: N (Min N7)\n\nUse [`minAdd`](#minAdd) to add exact numbers.\n\n","type":"N.N (N.In addedMin addedMinAtLeast_ (N.Is (N.Diff min N.To sumMin) addedDiff1_)) -> N.N (N.In addedMin addedMax_ addedDifference_) -> N.N (N.In min max_ difference_) -> N.N (N.Min sumMin)"},{"name":"addDifference","comment":" To the number, add a specific other one by supplying one of its [difference](#Diff)s\npromised by its type [`Is (Diff low0 To high0) (Diff low1 To high1)`](#Is)\n","type":"N.Diff low N.To high -> low -> high"},{"name":"addIn","comment":" Add an [`N`](#N) that can be in a range.\n\nThe tuple argument should contain\n\n1.  the minimum added value\n2.  the maximum added value\n\n```\nbetween3And10 |> N.addIn ( n1, n12 ) between1And12\n--: N (In N4 (N22Plus a_) {})\n```\n\n","type":"( N.N (N.In addedMin addedMinAtLeast_ (N.Is (N.Diff min N.To sumMin) addedMinDiff1_)), N.N (N.In addedMax addedMaxAtLeast_ (N.Is (N.Diff max N.To sumMax) addedMaxDiff1_)) ) -> N.N (N.In addedMin addedMax addedDifference_) -> N.N (N.In min max difference_) -> N.N (N.In sumMin sumMax {})"},{"name":"atLeast","comment":" Return the given number if the [`N`](#N) is less.\n\n    between5And9 |> N.atLeast n10\n    --: N (In N10 (Add10 a_) {})\n\n    n15 |> N.atLeast n10 |> N.toInt\n    --> 15\n\n    n5AtLeast |> N.atLeast (n10 |> noMax)\n    --: N (Min N10)\n\n(The type doesn't forbid that the lower limit you're comparing against\nis below the current minimum.)\n\n","type":"N.N (N.In minNewMin (N.Add1 maxMinus1) lowerDifference_) -> N.N (N.In min_ (N.Add1 maxMinus1) difference_) -> N.N (N.In minNewMin (N.Add1 maxMinus1) {})"},{"name":"atMost","comment":" **Cap** the [`N`](#N) to at most a number.\n\n    between5And15\n        |> N.atMost n10\n    --: N (In N5 (Add10 a_) {})\n\n    atLeast5 |> N.atMost n10\n    --: N (In N5 (Add10 a_) {})\n\n(The type doesn't forbid that the upper limit you're comparing against\nis above the current maximum.)\n\n","type":"N.N (N.In min maxCapped capDifference_) -> N.N (N.In min max_ difference_) -> N.N (N.In min maxCapped {})"},{"name":"diffAdd","comment":" The [`N (In ... (Is ...))`](#Is) plus another [`N (In ... (Is ...))`](#Is). Give the added value twice as a tuple.\n\n    n6 |> N.diffAdd ( n5, n5 )\n    --→ n11\n    --: N\n    --:     (In\n    --:         N11\n    --:         (Add11 a_)\n    --:         (Is\n    --:             (Diff x0 To (Add11 x0))\n    --:             (Diff x1 To (Add11 x1))\n    --:         )\n    --:     )\n\nThis is only rarely useful, as for example\n\n    isInRangeXToXPlus10 x =\n        isIn ( x, x |> N.diffAdd ( n10, n10 ) )\n\nwould force x to be of type N (In ... (Is ...)). Instead,\n\n    isInXToXPlus10 x =\n        isIn ( x, x |> N.add n10 )\n\n","type":"( N.N (N.In added added0AtLeast_ (N.Is (N.Diff n N.To sum) (N.Diff nAtLeast N.To sumAtLeast))), N.N (N.In added added1AtLeast_ (N.Is (N.Diff x0PlusN N.To aPlusSum) (N.Diff x1PlusN N.To bPlusSum))) ) -> N.N (N.In n nAtLeast (N.Is (N.Diff x0 N.To x0PlusN) (N.Diff x1 N.To x1PlusN))) -> N.N (N.In sum sumAtLeast (N.Is (N.Diff x0 N.To aPlusSum) (N.Diff x1 N.To bPlusSum)))"},{"name":"diffSub","comment":" The `N (In ... (Is ...)` minus another [`N (In ... (Is ...))`](#Is). Give the subtracted value twice as a tuple.\n\n    n6 |> N.diffSub ( n5, n5 )\n    --→ n1\n    --: N\n    --:     (In\n    --:         N1\n    --:         (Add1 a_)\n    --:         (Is\n    --:             (Diff x0 To (Add1 x0))\n    --:             (Diff x1 To (Add1 x1))\n    --:         )\n    --:     )\n\nThis is only rarely useful, as for example\n\n    isInXMinus10ToX x =\n        isIn ( x |> N.diffSub ( n10, n10 ), x )\n\nwould force `x` to be of type [`N (In ... (Is ...))`](#Is).\nInstead,\n\n    isInXMinus10ToX x =\n        isIn ( x |> N.sub n10, x )\n\n","type":"( N.N (N.In subtracted subtracted0AtLeast_ (N.Is (N.Diff difference N.To n) (N.Diff differenceAtLeast N.To nAtLeast))), N.N (N.In subtracted subtracted1AtLeast_ (N.Is (N.Diff x0PlusDifference N.To x0PlusN) (N.Diff x1PlusDifference N.To x1PlusN))) ) -> N.N (N.In n nAtLeast (N.Is (N.Diff x0 N.To x0PlusN) (N.Diff x1 N.To x1PlusN))) -> N.N (N.In difference differenceAtLeast (N.Is (N.Diff x0 N.To x0PlusDifference) (N.Diff x1 N.To x1PlusDifference)))"},{"name":"difference0","comment":" The number representation as a [difference](#Diff) promised by its type [`Is (Diff low To high) ...`](#Is).\n","type":"N.N (N.In min_ max_ { differences_ | diff0 : difference0 }) -> difference0"},{"name":"difference1","comment":" The number representation as a [difference](#Diff) promised by its type [`Is ... (Diff low To high)`](#Is).\n","type":"N.N (N.In min_ max_ { differences_ | diff1 : difference1 }) -> difference1"},{"name":"differenceAdd","comment":" Chain the [difference](#Diff) further to a higher number.\n","type":"N.Diff middle N.To high -> N.Diff low N.To middle -> N.Diff low N.To high"},{"name":"differenceSub","comment":" Chain the [difference](#Diff) back to a lower number.\n","type":"N.Diff middle N.To high -> N.Diff low N.To high -> N.Diff low N.To middle"},{"name":"differences","comment":" The number representation as all [difference](#Diff)s promised by its type [`Is (Diff low0 To high0) (Diff low1 To high1)`](#Is).\n\nFor the individual [difference](#Diff)s: [`difference0`](#difference0), [`difference1`](#difference1)\n\n","type":"N.N (N.In min_ max_ differences) -> differences"},{"name":"div","comment":" Divide (`//`) by an [`N`](#N) `d ≥ 1`.\n\n  - `/ 0` is impossible\n  - `x / d` is at most x\n\n```\natMost7\n    |> N.div n3\n    --: N (In N0 (Add7 a_) {})\n    |> N.toInt\n--> 2\n```\n\n","type":"N.N (N.In (N.Add1 divisorMinMinus1_) divisorMax_ divisorDifference_) -> N.N (N.In min_ max difference_) -> N.N (N.In N.N0 max {})"},{"name":"intAtLeast","comment":" A `N (Min ...)` from an `Int`; if the `Int < minimum`, `minimum` is returned.\n\n    0\n        |> N.intAtLeast n3\n        --: N (Min N3)\n        |> N.toInt\n    --> 3\n\n    9\n        |> N.intAtLeast n3\n        --: N (Min N3)\n        |> N.toInt\n    --> 9\n\nYou can also use this if you know an `Int` must be at least `minimum`.\n\nBut avoid it if you can do better, like\n\n    goodLength =\n        List.foldl\n            (\\_ -> N.minAdd n1 >> N.minDown n0)\n            (n0 |> N.noMax)\n\nIf you want to handle the case `< minimum` yourself → [`intIsAtLeast`](#intIsAtLeast)\n\n","type":"N.N (N.In min max_ lowerDifference_) -> Basics.Int -> N.N (N.Min min)"},{"name":"intIn","comment":" Create a `N (In ...)` by **clamping** an `Int` between a minimum & maximum.\n\n  - if the `Int < minimum`, `minimum` is returned\n  - if the `Int > maximum`, `maximum` is returned\n\nIf you want to handle the cases `< minimum` & `> maximum` explicitly, use [`intIsIn`](#intIsIn).\n\n    0\n        |> N.intIn ( n3, n12 )\n        --: N (In N3 (Add12 a_) {})\n        |> N.toInt\n    --> 3\n\n    99\n        |> N.intIn ( n3, n12 )\n        --: N (In N3 (Add12 a_) {})\n        |> N.toInt\n    --> 12\n\n    9\n        |> N.intIn ( n3, n12 )\n        --: N (In N3 (Add12 a_) {})\n        |> N.toInt\n    --> 9\n\n\n    toDigit : Char -> Maybe (N (In N0 (Add9 atLeast_) {}))\n    toDigit char =\n        ((char |> Char.toCode) - ('0' |> Char.toCode))\n            |> N.intIsIn ( n0, n9 )\n            |> Result.toMaybe\n\n","type":"( N.N (N.In lowerLimit upperLimitMin lowerLimitDifference_), N.N (N.In upperLimitMin upperLimit upperLimitDifference_) ) -> Basics.Int -> N.N (N.In lowerLimit upperLimit {})"},{"name":"intIsAtLeast","comment":" If the `Int ≥` a given `minimum`,\nreturn `Ok` with the `N (Min minimum)`,\nelse `Err` with the input `Int`.\n\n    4 |> N.intIsAtLeast n5\n    --: Result Int (N (Min N5))\n    --> Err 4\n\n    1234 |> N.intIsAtLeast n5 |> Result.map N.toInt\n    --> Ok 1234\n\n","type":"N.N (N.In min max_ minimumLimitDifference_) -> Basics.Int -> Result.Result Basics.Int (N.N (N.Min min))"},{"name":"intIsIn","comment":" Compared to a range from a lower to an upper bound, is the `Int` in range, [`BelowOrAbove`](#BelowOrAbove)?\n\n    inputIntJudge : Int -> Result String (N (In N1 (Add10 a_) {}))\n    inputIntJudge int =\n        case int |> N.intIsIn ( n1, n10 ) of\n            Ok inRange ->\n                inRange |> N.maxOpen n10 |> Ok\n            Err (N.Below _) ->\n                Err \"must be ≥ 1\"\n            Err (N.Above _) ->\n                Err \"must be ≤ 100\"\n\n    0 |> inputIntJudge\n    --> Err \"must be ≥ 1\"\n\n","type":"( N.N (N.In minDownLimit maxUpperLimit lowerLimitDifference_), N.N (N.In maxUpperLimit maxUpperLimitAtLeast upperLimitDifference_) ) -> Basics.Int -> Result.Result (N.BelowOrAbove Basics.Int (N.N (N.Min (N.Add1 maxUpperLimit)))) (N.N (N.In minDownLimit maxUpperLimitAtLeast {}))"},{"name":"is","comment":" Is the [`N`](#N) equal to, [`BelowOrAbove`](#BelowOrAbove) a given number?\n\n    giveAPresent { age } =\n        case age |> N.is n18 of\n            Err (N.Below younger) ->\n                toy { age = younger }\n\n            Err (N.Above older) ->\n                book { age = older }\n\n            Ok _ ->\n                bigPresent\n\n    toy : { age : N (In min_ N17 difference_) } -> Toy\n\n    book :\n        { age : N (In (N19 minMinus19_) max_ difference_) }\n        -> Book\n\n(The type doesn't forbid that the number you're comparing against\nis below the current minimum or above the current maximum.\n→ `Err` or `Ok` values don't necessarily follow `min <= max` for `N (In min max ...)`\nLuckily that's not a problem, since the values won't be produced anyway.)\n\n","type":"N.N (N.In comparedAgainstMin (N.Add1 comparedAgainstMaxMinus1) comparedAgainstDifference) -> N.N (N.In min max difference_) -> Result.Result (N.BelowOrAbove (N.N (N.In min comparedAgainstMaxMinus1 {})) (N.N (N.In (N.Add1 comparedAgainstMin) max {}))) (N.N (N.In comparedAgainstMin (N.Add1 comparedAgainstMaxMinus1) comparedAgainstDifference))"},{"name":"isAtLeast","comment":" Is the [`N`](#N) below than or at least as big as a given number?\n\n    vote :\n        { age : N (In (Add18 minMinus18_) max_ difference_) }\n        -> Vote\n\n    tryToVote { age } =\n        case age |> N.isAtLeast n18 of\n            Err _ ->\n                --😓\n                Nothing\n\n            Ok oldEnough ->\n                vote { age = oldEnough } |> Just\n\n    factorial : N (In min_ max_ difference_) -> N (Min N1)\n    factorial =\n        factorialBody\n\n    factorialBody : N (In min_ max_ difference_) -> N (Min N1)\n    factorialBody x =\n        case x |> N.isAtLeast n1 of\n            Err _ ->\n                n1 |> N.noMax\n\n            Ok atLeast1 ->\n                factorial (atLeast1 |> N.minSub n1)\n                    |> N.mul atLeast1\n\n(The type doesn't forbid that the lower limit you're comparing against\nis below the current minimum or above the current maximum.\n→ `Err` or `Ok` values don't necessarily follow `min <= max` for `N (In min max ...)`\nLuckily that's not a problem, since the values won't be produced anyway.)\n\n","type":"N.N (N.In lowerLimitMin (N.Add1 lowerLimitMaxMinus1) lowerLimitDifference_) -> N.N (N.In min max difference_) -> Result.Result (N.N (N.In min lowerLimitMaxMinus1 {})) (N.N (N.In lowerLimitMin max {}))"},{"name":"isAtMost","comment":" Is the [`N`](#N) at most (`Ok`) or greater than (`Err`) a given number?\n\n    goToBelow18Party : { age : N (In min_ N17 difference_) } -> Snack\n\n    tryToGoToBelow18Party { age } =\n        case age |> N.isAtMost n17 of\n            Ok below18 ->\n                goToBelow18Party { age = below18 } |> Just\n\n            Err _ ->\n                Nothing\n\n(The type doesn't forbid that the upper limit you're comparing against\nis below the current minimum or above the current maximum.\n→ `Err` or `Ok` values don't necessarily follow `min <= max` for `N (In min max ...)`\nLuckily that's not a problem, since the values won't be produced anyway.)\n\n","type":"N.N (N.In upperLimitMin upperLimitMax upperLimitDifference_) -> N.N (N.In min max difference_) -> Result.Result (N.N (N.In (N.Add1 upperLimitMin) max {})) (N.N (N.In min upperLimitMax {}))"},{"name":"isIn","comment":" Compared to a range from a lower to an upper bound,\nis the [`N`](#N) in range or [`BelowOrAbove`](#BelowOrAbove)?\n\n    isIn3To10 : N (In min_ (Add10 maxMinus10_) d_) -> Maybe (N (In N3 (Add10 a_) {}))\n    isIn3To10 =\n        N.isIn ( n3, n10 )\n            >> Result.toMaybe\n\n    n9 |> isIn3To10 |> Maybe.map N.toInt\n    --> Just 9\n\n    n12 |> isIn3To10\n    --> Nothing\n\n(The type doesn't forbid that the limits you're comparing against\nare below the current minimum, above the current maximum or in the wrong order.\n→ `Err` or `Ok` values don't necessarily follow `min <= max` for `N (In min max ...)`\nLuckily that's not a problem, since the values won't be produced anyway.)\n\nHere's some example-cases:\n\n  - `hi < lo < min < max` → `Below | Above`\n  - `hi < min < lo < max` → `Below | Above`\n  - `hi < min < max < lo` → `Below | Above`\n  - `lo < hi < min < max` → `Above`\n  - `max < hi < min < lo` → `Below`\n  - `min < hi < lo < max` → `Below | Above`\n  - `lo < min < hi < max` → `Ok | Above`\n  - `max < min < hi < lo` → `Below`\n  - `max < lo < hi < min` → `Below | Ok | Above` ← the default case\n  - `lo < min < max < hi` → `Ok`\n  - `min < lo < max < hi` → `Ok | Below`\n  - `min < max < lo < hi` → `Below`\n\n.\n\n  - did we miss something? → issue\n  - feel motivated to add the other cases? → PR\n\n","type":"( N.N (N.In lowerLimit (N.Add1 lowerLimitMaxMinus1) lowerLimitDifference_), N.N (N.In upperLimitMin upperLimitMax upperLimitDifference_) ) -> N.N (N.In min max difference_) -> Result.Result (N.BelowOrAbove (N.N (N.In min lowerLimitMaxMinus1 {})) (N.N (N.In (N.Add1 upperLimitMin) max {}))) (N.N (N.In lowerLimit upperLimitMax {}))"},{"name":"maxOpen","comment":" Make it fit into functions with require a higher maximum.\n\nYou should type arguments and stored types as broad as possible.\n\n    onlyAtMost18 : N (In min_ N18 difference_) -> ...\n\n    onlyAtMost18 between3And8 -- works\n\nBut once you implement `onlyAtMost18`, you might use the n in `onlyAtMost19`:\n\n    onlyAtMost18 n =\n        -- onlyAtMost19 n → error\n        onlyAtMost19 (n |> N.maxOpen n18)\n\n","type":"N.N (N.In max maxOpen maxOpenDifference_) -> N.N (N.In min max difference_) -> N.N (N.In min maxOpen {})"},{"name":"maxUp","comment":" Have a specific maximum in mind? → [`maxOpen`](#maxOpen)\n\nWant to increase the upper bound by a fixed amount? ↓\n\n    maxUp4 : N (In min max difference_) -> N (In min (Add4 max) {})\n    maxUp4 =\n        N.maxUp n4\n\nWhen is this useful? Very rarely. This is how [`up`](#up) reverse could be implemented\n\n    down :\n        N (In min (Add1 maxMinus1) difference_)\n        -> List (N (In N0 maxMinus1 {}))\n    down length =\n        case length |> isAtLeast n1 of\n            Err _ ->\n                []\n\n            Ok lengthAtLeast1 ->\n                let\n                    lengthMinus1 =\n                        lengthAtLeast1 |> sub n1\n                in\n                lengthMinus1\n                    :: (lengthMinus1\n                            -- → In N0 maxMinus1\n                            |> maxUp n1\n                            |> downRecursive\n                       )\n\n(to be fair: here, you could also use `lengthAtLeast1 |> subMin n1` instead of `lengthMinus1 |> maxUp n1`)\n\n","type":"N.N (N.In increase_ increaseAtLeast_ (N.Is (N.Diff max N.To maxIncreased) diff1_)) -> N.N (N.In min max difference_) -> N.N (N.In min maxIncreased {})"},{"name":"maximumUnknown","comment":" Constructor for [`NoMax`](#NoMax)\n","type":"N.NoMax"},{"name":"minAdd","comment":" To the [`N`](#N) without a known maximum-constraint,\nadd a specific [`N (In ... (Is ...))`](#Is) value.\n\n    atLeast70 |> N.add n7\n    --: N (Min N77)\n\nUse [`addAtLeast`](#addAtLeast) if you want to add an [`N`](#N) that can be in a range.\n\n","type":"N.N (N.In added_ addedAtLeast_ (N.Is (N.Diff min N.To sumMin) addedDiff1_)) -> N.N (N.In min max_ difference_) -> N.N (N.Min sumMin)"},{"name":"minDown","comment":" Set the minimum lower.\n\n    [ atLeast3, atLeast4 ]\n\nElm complains:\n\n> But all the previous elements in the list are: `N (Min N3)`\n\n    [ atLeast3\n    , atLeast4 |> N.minDown n3\n    ]\n\n","type":"N.N (N.In newMin min lowerDifference_) -> N.N (N.In min max difference_) -> N.N (N.In newMin max {})"},{"name":"minSub","comment":" From an [`N`](#N) with an unknown maximum constraint,\nsubtract a [specific number](#Is)\n\n    atLeast7 |> N.minSub n2\n    --: N (Min N5)\n\nUse [`minSubAtMost`](#minSubAtMost) if you want to subtract an [`N`](#N) that can be in a range.\n\n","type":"N.N (N.In subtracted_ subtractedAtLeast_ (N.Is (N.Diff differenceMin N.To min) subtractedDiff1_)) -> N.N (N.In min max difference_) -> N.N (N.In differenceMin max {})"},{"name":"minSubAtMost","comment":" From an [`N`](#N) without an unknown maximum constraint,\nsubtract a number in a range.\n\nThe first argument is the maximum of the subtracted number.\n\n    atLeast6 |> N.minSubAtMost n5 between0And5\n    --: N (Min N1)\n\n","type":"N.N (N.In subtractedMax subtractedMaxAtLeast_ (N.Is (N.Diff differenceMin N.To min) subtractedMaxDiff1_)) -> N.N (N.In (N.N0able subtractedMinPlus1_ Possibly.Possibly) subtractedMax subtractedDifference_) -> N.N (N.In min max difference_) -> N.N (N.In differenceMin max {})"},{"name":"minimum","comment":" The smallest allowed number promised by the [range type](#In).\n","type":"N.N (N.In minimum maximum_ difference_) -> minimum"},{"name":"mul","comment":" Multiply by [`N`](#N) `n ≥ 1`.\nwe know that if `n ≥ 1`, `x * n ≥ x`.\n\n    atLeast5 |> N.mul n2\n    --: N (Min N5)\n\n    atLeast2 |> N.mul n5\n    --: N (Min N2)\n\n","type":"N.N (N.In (N.Add1 multiplicandMinMinus1_) multiplicandMax_ multiplicandDifference_) -> N.N (N.In min max_ difference_) -> N.N (N.Min min)"},{"name":"n0","comment":" The exact natural number `0`\n","type":"N.N (N.In N.N0 atLeast_ (N.Is (N.Diff x0 N.To x0) (N.Diff x1 N.To x1)))"},{"name":"n1","comment":" The exact natural number `1`\n","type":"N.N (N.In N.N1 (N.Add1 atLeast_) (N.Is (N.Diff x0 N.To (N.Add1 x0)) (N.Diff x1 N.To (N.Add1 x1))))"},{"name":"n10","comment":" The exact natural number `10`\n","type":"N.N (N.In N.N10 (N.Add10 atLeast_) (N.Is (N.Diff x0 N.To (N.Add10 x0)) (N.Diff x1 N.To (N.Add10 x1))))"},{"name":"n11","comment":" The exact natural number `11`\n","type":"N.N (N.In N.N11 (N.Add11 atLeast_) (N.Is (N.Diff x0 N.To (N.Add11 x0)) (N.Diff x1 N.To (N.Add11 x1))))"},{"name":"n12","comment":" The exact natural number `12`\n","type":"N.N (N.In N.N12 (N.Add12 atLeast_) (N.Is (N.Diff x0 N.To (N.Add12 x0)) (N.Diff x1 N.To (N.Add12 x1))))"},{"name":"n13","comment":" The exact natural number `13`\n","type":"N.N (N.In N.N13 (N.Add13 atLeast_) (N.Is (N.Diff x0 N.To (N.Add13 x0)) (N.Diff x1 N.To (N.Add13 x1))))"},{"name":"n14","comment":" The exact natural number `14`\n","type":"N.N (N.In N.N14 (N.Add14 atLeast_) (N.Is (N.Diff x0 N.To (N.Add14 x0)) (N.Diff x1 N.To (N.Add14 x1))))"},{"name":"n15","comment":" The exact natural number `15`\n","type":"N.N (N.In N.N15 (N.Add15 atLeast_) (N.Is (N.Diff x0 N.To (N.Add15 x0)) (N.Diff x1 N.To (N.Add15 x1))))"},{"name":"n16","comment":" The exact natural number `16`\n","type":"N.N (N.In N.N16 (N.Add16 atLeast_) (N.Is (N.Diff x0 N.To (N.Add16 x0)) (N.Diff x1 N.To (N.Add16 x1))))"},{"name":"n2","comment":" The exact natural number `2`\n","type":"N.N (N.In N.N2 (N.Add2 atLeast_) (N.Is (N.Diff x0 N.To (N.Add2 x0)) (N.Diff x1 N.To (N.Add2 x1))))"},{"name":"n3","comment":" The exact natural number `3`\n","type":"N.N (N.In N.N3 (N.Add3 atLeast_) (N.Is (N.Diff x0 N.To (N.Add3 x0)) (N.Diff x1 N.To (N.Add3 x1))))"},{"name":"n4","comment":" The exact natural number `4`\n","type":"N.N (N.In N.N4 (N.Add4 atLeast_) (N.Is (N.Diff x0 N.To (N.Add4 x0)) (N.Diff x1 N.To (N.Add4 x1))))"},{"name":"n5","comment":" The exact natural number `5`\n","type":"N.N (N.In N.N5 (N.Add5 atLeast_) (N.Is (N.Diff x0 N.To (N.Add5 x0)) (N.Diff x1 N.To (N.Add5 x1))))"},{"name":"n6","comment":" The exact natural number `6`\n","type":"N.N (N.In N.N6 (N.Add6 atLeast_) (N.Is (N.Diff x0 N.To (N.Add6 x0)) (N.Diff x1 N.To (N.Add6 x1))))"},{"name":"n7","comment":" The exact natural number `7`\n","type":"N.N (N.In N.N7 (N.Add7 atLeast_) (N.Is (N.Diff x0 N.To (N.Add7 x0)) (N.Diff x1 N.To (N.Add7 x1))))"},{"name":"n8","comment":" The exact natural number `8`\n","type":"N.N (N.In N.N8 (N.Add8 atLeast_) (N.Is (N.Diff x0 N.To (N.Add8 x0)) (N.Diff x1 N.To (N.Add8 x1))))"},{"name":"n9","comment":" The exact natural number `9`\n","type":"N.N (N.In N.N9 (N.Add9 atLeast_) (N.Is (N.Diff x0 N.To (N.Add9 x0)) (N.Diff x1 N.To (N.Add9 x1))))"},{"name":"noDiff","comment":" Convert it to a `N (In min max {})`.\n\n    n4 |> N.noDiff\n    --: N (In N4 (Add4 a_) {})\n\nExample\n\n    [ in3To10, n3 ]\n\n> all the previous elements in the list are: `N (In N3 N10 {})`\n\n    [ in3To10\n    , n3 |> N.noDiff\n    ]\n\n","type":"N.N (N.In min max difference_) -> N.N (N.In min max {})"},{"name":"noMax","comment":" Convert a `N (In min ...)` to a `N (Min min)`.\n\n    between3And10 |> N.noMax\n    --: N (Min N4)\n\nUse it to unify different types of number minimum constraints like\n\n    [ atLeast1, between1And10 ]\n\nElm complains:\n\n> But all the previous elements in the list are: `N (Min N1)`\n\n    [ atLeast1\n    , between1And10 |> N.noMax\n    ]\n\n","type":"N.N (N.In min max_ difference_) -> N.N (N.Min min)"},{"name":"random","comment":" Generate a random [`N`](#N) in a range.\n\n    N.random ( n1, n10 )\n    --: Random.Generator (N (In N1 (Add10 a_) {}))\n\n","type":"( N.N (N.In lowerLimitMin upperLimitMin lowerLimitDifference_), N.N (N.In upperLimitMin upperLimitMax upperLimitDifference_) ) -> Random.Generator (N.N (N.In lowerLimitMin upperLimitMax {}))"},{"name":"remainderBy","comment":" The remainder after dividing by a [`N`](#N) `d ≥ 1`.\nWe know `x % d ≤ d - 1`\n\n    atMost7 |> N.remainderBy n3\n    --: N (In N0 (Add3 a_) {})\n\n","type":"N.N (N.In (N.Add1 divisorMinMinus1_) (N.Add1 divisorMaxMinus1) divisorDifference_) -> N.N (N.In min_ max_ difference_) -> N.N (N.In N.N0 divisorMaxMinus1 {})"},{"name":"sub","comment":" Subtract a given specific [`N (In ... (Is ...))`](#Is).\n\n    between7And10 |> N.sub n7\n    --: N (In N0 (Add3 a_) {})\n\nUse [`subIn`](#subIn) if you want to subtract an [`N`](#N) that isn't a [`N (In ... (Is ...))`](#Is).\n\n","type":"N.N (N.In subtractedMin_ subtractedMax_ (N.Is (N.Diff differenceMin N.To min) (N.Diff differenceMax N.To max))) -> N.N (N.In min max diff_) -> N.N (N.In differenceMin differenceMax {})"},{"name":"subDifference","comment":" To the number, subtract a specific other one by supplying one of its [difference](#Diff)s\npromised by its type [`Is (Diff low0 To high0) (Diff low1 To high1)`](#Is)\n","type":"N.Diff low N.To high -> high -> low"},{"name":"subIn","comment":" Subtract an [`N`](#N) that can be in a range.\n\nThe tuple argument should contain\n\n1.  the minimum subtracted value\n2.  the maximum subtracted value\n\n```\nbetween6And12 |> N.subIn ( n1, n5 ) between1And5\n--: N (In N1 (Add5 a_) {})\n```\n\n","type":"( N.N (N.In subtractedMin subtractedMinAtLeast_ (N.Is (N.Diff differenceMax N.To max) subtractedMinDiff1_)), N.N (N.In subtractedMax subtractedMaxAtLeast_ (N.Is (N.Diff differenceMin N.To min) subtractedMaxDiff1_)) ) -> N.N (N.In subtractedMin subtractedMax subtractedDifference_) -> N.N (N.In min max difference_) -> N.N (N.In differenceMin differenceMax {})"},{"name":"toFloat","comment":" Drop the range constraints\nto feed another library with its `Float` representation.\n","type":"N.N range_ -> Basics.Float"},{"name":"toInt","comment":" Drop the range constraints\nto feed another library with its `Int` representation.\n","type":"N.N range_ -> Basics.Int"},{"name":"toPower","comment":" [`N`](#N) Raised to a given power `p ≥ 1`\n→ `x ^ p ≥ x`\n\n    atLeast5 |> N.toPower n2\n    --: N (Min N5)\n\n    atLeast2 |> N.toPower n5\n    --: N (Min N2)\n\n","type":"N.N (N.In (N.Add1 exponentMinMinus1_) (N.Add1 exponentMax_) exponentDifference_) -> N.N (N.In min max_ difference_) -> N.N (N.Min min)"},{"name":"until","comment":" [`N`](#N)s increasing from `0` to `n`\nIn the end, there are `n` numbers.\n\n    N.until n6\n        |> List.map (N.add n3)\n        --: List (N (In N3 (Add9 a_)))\n        |> List.map N.toInt\n    --> [ 3, 4, 5, 6, 7, 8, 9 ]\n\n    N.up atLeast7 |> List.map (N.add n3)\n    --: List (N (Min N10))\n\n[`typesafe-array`](https://package.elm-lang.org/packages/lue-bird/elm-typesafe-array/latest/Arr#nats) even knows the length! Try it.\n\n","type":"N.N (N.In min_ max difference_) -> Emptiable.Emptiable (Stack.Stacked (N.N (N.In N.N0 max {}))) Basics.Never"},{"name":"up","comment":" [`N`](#N)s increasing from `0` to `n - 1`.\nIn the end, there are `n` numbers.\n\n> @deprecated in favor of [`until`](#until)\n> If you'd like to keep this → issue\n\n    N.up n7\n        |> List.map (N.add n3)\n        --: List (N (In N3 (Add9 a_)))\n        |> List.map N.toInt\n    --> [ 3, 4, 5, 6, 7, 8, 9 ]\n\n[`typesafe-array`](https://package.elm-lang.org/packages/lue-bird/elm-typesafe-array/latest/Arr#nats) even knows the length! Try it.\n\n","type":"N.N (N.In min_ (N.Add1 maxMinus1) difference_) -> List.List (N.N (N.In N.N0 maxMinus1 {}))"}],"binops":[]}]