Uses magic to show and shrink functions.
- data Function a b = Function (FunctionTable a b) (a -> b)
- function :: (a -> b) -> Function a b
- newtype MonotonicFunction = Monotonic (Function Int Int)
- newtype StrictlyMonotonicFunction = StrictlyMonotonic (Function Int Int)
Magic functions
Functions from a
to b
which keep track of arguments
that they are applied to. This allows showing function tables
and shrinking functions.
Function (FunctionTable a b) (a -> b) |
Generating monotonic functions
newtype MonotonicFunction Source
Monotonic fun: guarantees that fun is monotonic.
newtype StrictlyMonotonicFunction Source
StrictlyMonotonic fun: guarantees that fun is strictly monotonic.