compound context seq fn: such-that
such-that:
description:
such-that[op] seq
filters the given sequence to those elements that return |yes> or |true> for op applied to that element
it is less powerful than filter() but on the other hand, it should be faster
examples:
is-hungry |Fred> => |no>
is-hungry |Sam> => |yes>
is-hungry |Emma> => |yes>
is-hungry |Liz> => |no>
such-that[is-hungry] rel-kets[*]
|Sam> + |Emma>
such-that[is-prime] srange(|1>, |20>)
|2> . |3> . |5> . |7> . |11> . |13> . |17> . |19>
see also:
filter
Home