1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors definitions generic generic.single
4 generic.single.private kernel namespaces words kernel.private
8 TUPLE: hook-combination < single-combination var ;
10 C: <hook-combination> hook-combination
12 PREDICATE: hook-generic < generic
13 "combination" word-prop hook-combination? ;
15 M: hook-combination picker
16 combination get var>> [ get ] curry ;
18 M: hook-combination dispatch# drop 0 ;
20 M: hook-combination mega-cache-quot
21 1quotation picker [ lookup-method (execute) ] surround ;
23 M: hook-generic definer drop \ HOOK: f ;
25 M: hook-generic effective-method
26 [ "combination" word-prop var>> get ] keep method-for-object ;