This pattern will filter the source pattern using the supplied function func.
Values from the source pattern will be passed to func. Pselect will only return that value if the func returns true.
This is the pattern library's equivalent of select.
func |
A Function that takes one parameter (the next value from pattern) and returns a boolean. |
pattern |
The source Pattern. |
The message select
returns a Pselect when passed to a pattern.