operator: such-that-or
description:
such-that-or[op1, op2, ... , opn] seq
filters the given sequence to elements that return true for at least one operator in op1, ... , opn
contrast with such-that-and[] that filters to elements that return true for all operators in op1, ... , opn
where the coeff of |true> must be >= 0.5
examples:
list-of |colors> => |red> + |orange> + |yellow> + |green> + |blue> + |indigo> + |violet>
list-of |digits> => range(|0>, |9>)
list-of |furniture> => |chair> + |table> + |lamp>
list-of |names> => |John> + |Mary> + |Sam> + |Emma> + |Liz> + |Jack> + |Fred>
list-of |animals> => |dog> + |cat> + |horse> + |mouse> + |elephant> + |rabbit>
list-of |things> => list-of split |colors digits furniture names animals>
is-a-color |*> #=> is-mbr(|_self>, list-of |colors>)
is-a-digit |*> #=> is-mbr(|_self>, list-of |digits>)
is-furniture |*> #=> is-mbr(|_self>, list-of |furniture>)
is-a-name |*> #=> is-mbr(|_self>, list-of |names>)
is-an-animal |*> #=> is-mbr(|_self>, list-of |animals>)
such-that-or[is-a-digit, is-a-name] list-of |things>
|0> + |1> + |2> + |3> + |4> + |5> + |6> + |7> + |8> + |9> + |John> + |Mary> + |Sam> + |Emma> + |Liz> + |Jack> + |Fred>
see also:
such-that, such-that-and
TODO:
fix quirk so we don't need literal operator wrappers around function operators.
eg: is-prime |*> #=> is-prime |_self>
Home