const
lib.const
Docs pulled from | This Revision | about 9 hours ago
The constant function
Ignores the second argument. If called with only one argument, constructs a function that always returns a static value.
Inputs
x
-
Value to return
y
-
Value to ignore
Type
const :: a -> b -> a
Examples
lib.trivial.const
usage example
let f = const 5; in f 10
=> 5