|| -package:lens

Boolean "or", lazy in the second argument
Type-level "or"
Boolean "or"
The disjunction of two predicates.
Logical inclusive disjunction. (infixr 2)
A synonym of or2.
A predicate checking if the input matches one of the given predicates
>>> 1 `shouldSatisfy` P.lt 5 P.|| P.gt 10
Apply the or (||) operator to two boolean streams, point-wise.
Logical disjunction (inclusive or).
An infix alias for Or.
RB.get (r1 RB.|| r2) === (RB.get r1 || RB.get r2)
RDB.get (r1 RDB.|| r2) === (RDB.get r1 || RDB.get r2)
Fanin: Split the input between the two argument arrows and merge their outputs. The default definition may be overridden with a more efficient version if desired.
Declare a variable and then Assign the variable to an expression
foo |= expr ==> var foo; foo = expr;
The lazy || operator lifted to a monad. If the first argument evaluates to True the second argument will not be evaluated.
Just True  ||^ undefined  == Just True
Just False ||^ Just True  == Just True
Just False ||^ Just False == Just False
The OR of two lists of filters. For example:
selectList
([ PersonAge >. 25
, PersonAge <. 30 ] ||.
[ PersonIncome >. 15000
, PersonIncome <. 25000 ])
[]
will filter records where a person's age is between 25 and 30 or a person's income is between (15000 and 25000). If you are looking for an (&&.) operator to do (A AND B AND (C OR D)) you can use the (++) operator instead as there is no (&&.). For example:
selectList
([ PersonAge >. 25
, PersonAge <. 30 ] ++
([PersonCategory ==. 1] ||.
[PersonCategory ==. 5]))
[]
will filter records where a person's age is between 25 and 30 and (person's category is either 1 or 5).
horizontal concatenation
>>> ident 3 ||| konst 7 (3,4)
(3><7)
[ 1.0, 0.0, 0.0, 7.0, 7.0, 7.0, 7.0
, 0.0, 1.0, 0.0, 7.0, 7.0, 7.0, 7.0
, 0.0, 0.0, 1.0, 7.0, 7.0, 7.0, 7.0 ]
The || operator lifted to a monad. If the first argument evaluates to True the second argument will not be evaluated.
The field to the right is a list of the type of the target
The field to the right is a list of types which may contain the target