]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.units: simplify remember-class.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 9 Jun 2015 18:04:11 +0000 (11:04 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 9 Jun 2015 18:04:11 +0000 (11:04 -0700)
core/compiler/units/units.factor

index ea39e822398ab8c7f585ed8cd2bbcc10f140f807..0c0d05b52db59cbc1c94dd2bb52c36d566325384 100644 (file)
@@ -33,8 +33,9 @@ PRIVATE>
     old-definitions get [ delete ] with each ;
 
 : remember-class ( class loc -- )
-    [ dup new-definitions get first in? [ dup throw-redefine-error ] when ] dip
-    new-definitions get second (remember-definition) ;
+    new-definitions get first2
+    [ dupd in? [ dup throw-redefine-error ] when ]
+    [ (remember-definition) ] bi-curry* bi* ;
 
 : forward-reference? ( word -- ? )
     dup old-definitions get [ in? ] with any? [