Utility functions used by the package.
newLowercaseName : Basics.Int -> List String -> String
Generates a new unique name consisting only of lowercase letters.
import Lambda.Util exposing (newLowercaseName)
newLowercaseName 1 [] --> "a"
newLowercaseName 26 [] --> "z"
newLowercaseName 27 [] --> "aa"
newLowercaseName 28 [] --> "ab"
newLowercaseName 1 [ "a" ] --> "b"
newLowercaseName 1 [ "a", "b" ] --> "c"
toBase : Basics.Int -> Basics.Int -> List Basics.Int
Converts a decimal integer to another base as a List Int
.
import Lambda.Util exposing (toBase)
99 |> toBase 2 --> [1,1,0,0,0,1,1]
99 |> toBase 3 --> [1,0,2,0,0]
99 |> toBase 4 --> [1,2,0,3]
99 |> toBase 5 --> [3,4,4]
99 |> toBase 6 --> [2,4,3]
99 |> toBase 7 --> [2,0,1]
99 |> toBase 8 --> [1,4,3]
99 |> toBase 9 --> [1,2,0]