Module
Neon.Class.HasAnd
- Package
- purescript-neon
- Repository
- tfausak/purescript-neon
#HasAnd Source
class HasAnd a where
Represents types that can be conjoined. This is also known as logical conjunction.
true :and false -- false
Some types can't be conjoined per se but it is still useful to be able to
use the &&
operator with them. For example, you can and
two arrays
together to get their intersection.
[1, 2, 3] :and [2, 3, 4] -- [2, 3]
For integers, and
is bitwise.
5 :and 3 -- 3
The instance for functions is perhaps the hardest to understand. Combining
two functions with and
returns a new function that calls each function
and then and
s the results together.
even :and odd -- \ x -> (even x) :and (odd x)
(even :and odd) 3 -- false
Members
and :: a -> a -> a
Instances
- 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