object-operations ( obj -- operations ) (original) (raw)

object-operations ( obj -- operations )

Vocabulary
ui.operations

Inputs

obj an object

Outputs

operations a sequence of operation instances

Word description
Outputs a sequence of operations applicable to the given object, by testing each defined operation's predicate quotation in turn.

Definition

USING: accessors assocs combinators kernel namespaces sequences
;

IN: ui.operations

: object-operations ( obj -- operations )
operations get values
[ predicate>> ( obj -- ? ) call-effect ] with filter ;