query
On this page

const

lib.trivial.const

Docs pulled from | This Revision | 22 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

Noogle also knows

Aliases