2 The Prelude
The bindings documented in this section are provided by
algebraic/prelude and algebraic/racket/base.
These functions and function aliases add consistency to the functional Racket
programming experience and encourage compact code. They are used extensively
throughout the collection.
In addition to the bindings documented below, this module re-provides Racket’s
const and negate functions.
Applies f to the values produced by expr.
Returns a thunk that produces the values determined by the xs.
Returns a variadic function that behaves like f with its first two
Returns a function that composes f
with itself, equivalent to
(.. f f)
Applies f to the xs.
Equivalent to (λ (f x ...) ($ f (list x ...))).
Returns a left-curried version of f.
The >> function does not self-curry. Use >>* to
Returns a right-curried version of f.
The << function, unlike curryr, is not self-curried.
Equivalent to (curry f).
Equivalent to (curryr f).
Short names for common functions.
Returns a unary function that locates the first element of (v ...)
that is equal?
to its argument. If such an element exists,
the tail of (v ...)
starting with that element is returned.
Otherwise, the result is #f