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
6 QUALIFIED-WITH: generic.single.private gsp
9 TUPLE: hook-combination < single-combination var ;
11 C: <hook-combination> hook-combination
13 PREDICATE: hook-generic < generic
14 "combination" word-prop hook-combination? ;
16 M: hook-combination picker
17 combination get var>> [ get ] curry ;
19 M: hook-combination dispatch# drop 0 ;
21 M: hook-combination mega-cache-quot
22 1quotation picker [ gsp:lookup-method (execute) ] surround ;
24 M: hook-generic definer drop \ HOOK: f ;
26 M: hook-generic effective-method
27 [ "combination" word-prop var>> get ] keep method-for-object ;