Add gesture>operation word

db4
Slava Pestov 2009-01-31 02:39:38 -06:00
parent 7d632980d8
commit c253a81c99
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ SYMBOL: operations
: object-operations ( obj -- operations )
operations get [ predicate>> call ] with filter ;
: gesture>operation ( gesture object -- operation/f )
object-operations [ operation-gesture = ] with find nip ;
: find-operation ( obj quot -- command )
[ object-operations ] dip find-last nip ; inline