Classes | Streams-Patterns-Events > Patterns > Filter

Preject : FuncFilterPattern : FilterPattern : Pattern : AbstractFunction : Object

Filters a source pattern by rejecting particular values.

Description

Preject filters the source pattern using func. Values for which func returns true will not be returned by Preject.

This is the pattern library's equivalent of Collection: -reject.

Class Methods

Preject.new(func, pattern)

From superclass: FuncFilterPattern

Arguments:

func

A Function. The function used to reject values. It should take a single parameter (the next value from pattern), and return a boolean.

pattern

The Pattern to be filtered.

Inherited class methods

7 methods from Object ► show

Instance Methods

Inherited instance methods

1 methods from FilterPattern ► show
43 methods from Pattern ► show
159 methods from AbstractFunction ► show
266 methods from Object ► show

Undocumented instance methods

.asStream

.embedInStream(inval)

Examples

The message reject returns a Preject when passed to a pattern