Not sure if there is much appetite for this, but a Core-ish type is the function type. There are a bunch of helper functions to do with functions:
uncurry : (a -> b -> c) -> (a, b) -> c
curry : ((a, b) -> c) -> a -> b -> c
- all sorts of function combinators:
a -> b -> b, (a -> c) -> (b -> c -> d) -> a -> b -> d, yada yada
toFixpoint : (a -> a) -> a -> a and perhaps toFixpointWithLimit : Int -> (a -> a) -> a -> Result a a
while : (a -> Bool) -> (a -> a) -> a -> a and doWhile : (a -> a) -> (a -> Bool) -> a -> a
nTimes : Int -> (a -> a) -> a -> a
etc...
Thoughts? Opinions?
Not sure if there is much appetite for this, but a Core-ish type is the function type. There are a bunch of helper functions to do with functions:
uncurry : (a -> b -> c) -> (a, b) -> ccurry : ((a, b) -> c) -> a -> b -> ca -> b -> b,(a -> c) -> (b -> c -> d) -> a -> b -> d, yada yadatoFixpoint : (a -> a) -> a -> aand perhapstoFixpointWithLimit : Int -> (a -> a) -> a -> Result a awhile : (a -> Bool) -> (a -> a) -> a -> aanddoWhile : (a -> a) -> (a -> Bool) -> a -> anTimes : Int -> (a -> a) -> a -> aetc...
Thoughts? Opinions?