Pred multimethod
Methods
- Pred(anything:BasicTypeInstance) Source: stdlib.ngs:231
Convert anything to a predicate. Parameters
anything The value to compare to Returns
A function that compares the only argument to the given value
- Pred(h:Hash) Source: stdlib.ngs:237
Convert Hash to a predicate. The predicate asserts that object fields named after h hash keys return true for predicates made of corresponding hash values. Inspired by underscorejs' "matcher"
- Pred(f:Fun) Source: stdlib.ngs:245
Convert a function to predicate. Returns
The given function, without any transformation
- Pred(t:Type) Source: stdlib.ngs:250
Convert a type to a predicate. Parameters
t A type Returns
A function that checks whether the only argument is of type t
- Pred(s:SubSeq) Source: stdlib.ngs:5385
Undocumented
- Pred(r:RegExp) Source: stdlib.ngs:5571
Convert regular expression to a predicate. Returns
A function that checks whether the only argument (of type Str) matches rExample
%[w1 w2].filter(/1/) # %[w1]