Module
Neon.Primitive.Function
- Package
- purescript-neon
- Repository
- tfausak/purescript-neon
#always Source
always :: forall b a. a -> b -> a
Always returns the first argument.
"anything" :always 1 -- 1
This is the constant function.
#compose Source
compose :: forall c b a. (b -> c) -> (a -> b) -> (a -> c)
Returns a new function that calls the first function with the result of calling the second.
let addTwo x = x + 2
let double x = x * 2
let addTwoThenDouble x = addTwo :compose double
addTwoThenDouble 3 -- 10
This is function composition.
#flip Source
flip :: forall c b a. (a -> b -> c) -> (b -> a -> c)
Flips the first two arguments of a function.
"a" :add "b" -- "ab"
"a" :flip add "b" -- "ba"
#identity Source
identity :: forall a. a -> a
Returns the value it was given.
identity 1 -- 1
This is the identity function.
- Modules
- Neon
- Neon.
Class - Neon.
Class. HasAdd - Neon.
Class. HasAnd - Neon.
Class. HasApply - Neon.
Class. HasBottom - Neon.
Class. HasChain - Neon.
Class. HasCompare - Neon.
Class. HasDivide - Neon.
Class. HasEqual - Neon.
Class. HasFilter - Neon.
Class. HasFromArray - Neon.
Class. HasFromInt - Neon.
Class. HasGreater - Neon.
Class. HasInspect - Neon.
Class. HasLess - Neon.
Class. HasMap - Neon.
Class. HasMultiply - Neon.
Class. HasNot - Neon.
Class. HasOne - Neon.
Class. HasOr - Neon.
Class. HasPower - Neon.
Class. HasPure - Neon.
Class. HasReduce - Neon.
Class. HasRemainder - Neon.
Class. HasSubtract - Neon.
Class. HasToArray - Neon.
Class. HasToInt - Neon.
Class. HasTop - Neon.
Class. HasTraverse - Neon.
Class. HasZero - Neon.
Data - Neon.
Effect - Neon.
Helper - Neon.
Operator - Neon.
Primitive - Neon.
Primitive. Char - Neon.
Primitive. Function - Neon.
Primitive. Int - Neon.
Primitive. Number