Module
Neon.Primitive
- Package
- purescript-neon
- Repository
- tfausak/purescript-neon
Functions that operate on primitve data types. Note that not all data
types are represented. That's either because there's no actions you can
take on them in general (like Object
s) or because the actions are in
type classes instead (for Array
s).
Re-exports from Neon.Primitive.Char
Re-exports from Neon.Primitive.Function
#identity Source
identity :: forall a. a -> a
Returns the value it was given.
identity 1 -- 1
This is the identity function.
#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"
#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.
#always Source
always :: forall b a. a -> b -> a
Always returns the first argument.
"anything" :always 1 -- 1
This is the constant function.
Re-exports from Neon.Primitive.Int
Re-exports from Neon.Primitive.Number
- 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