||

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).
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.
Modify the target(s) of a Lens', 'Iso, Setter or Traversal by taking their logical || with a value.
>>> execState (do _1 ||= True; _2 ||= False; _3 ||= True; _4 ||= False) (True,True,False,False)
(True,True,True,False)
(||=) :: MonadState s m => Setter' s Bool    -> Bool -> m ()
(||=) :: MonadState s m => Iso' s Bool       -> Bool -> m ()
(||=) :: MonadState s m => Lens' s Bool      -> Bool -> m ()
(||=) :: MonadState s m => Traversal' s Bool -> Bool -> m ()
Logically || the target(s) of a Bool-valued Lens or Setter.
>>> both ||~ True $ (False,True)
(True,True)
>>> both ||~ False $ (False,True)
(False,True)
(||~) :: Setter' s Bool    -> Bool -> s -> s
(||~) :: Iso' s Bool       -> Bool -> s -> s
(||~) :: Lens' s Bool      -> Bool -> s -> s
(||~) :: Traversal' s Bool -> Bool -> s -> s
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 ]