]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/delegate/delegate.factor
delocalize hook-consultation
[factor.git] / basis / delegate / delegate.factor
index ab3a12b9ad8231e95e10b121af8b4b692b7ee5cb..786bbd431d0e4140477c280d7b5a383bc977ca16 100644 (file)
@@ -79,8 +79,9 @@ M: consultation (consult-method-quot)
 M: broadcast (consult-method-quot)
     '[ _ call [ _ execute ] each ] nip ;
 
-M:: hook-consultation (consult-method-quot) ( consultation quot word -- object )
-    [ quot call consultation hook-var>> [ word execute ] with-variable ] ;
+M: hook-consultation (consult-method-quot) ( consultation quot word -- object )
+    [ hook-var>> ] 2dip
+    '[ _ _ call swap [ _ execute ] with-variable ] ;
 
 : consult-method-quot ( consultation word -- object )
     [ dup quot>> ] dip