const
lib.const
Docs pulled from | This Revision | 17 minutes 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