]> gitweb.factorcode.org Git - factor.git/commitdiff
inverse: minor cleanup.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 10 May 2016 04:36:45 +0000 (21:36 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 10 May 2016 04:38:05 +0000 (21:38 -0700)
basis/inverse/inverse.factor

index 887fd58c7e6e1a4210d05ac2e12d4ec87388dca5..c9f5ada3da6dcc96fd35c3ed387b97bf98216256 100644 (file)
@@ -35,13 +35,10 @@ M: fail summary drop "Matching failed" ;
 ERROR: bad-math-inverse ;
 
 : next ( revquot -- revquot* first )
-    [ bad-math-inverse ]
-    [ unclip-slice ] if-empty ;
+    [ bad-math-inverse ] [ unclip-slice ] if-empty ;
 
 : constant-word? ( word -- ? )
-    stack-effect
-    [ out>> length 1 = ]
-    [ in>> empty? ] bi and ;
+    stack-effect [ out>> length 1 = ] [ in>> empty? ] bi and ;
 
 : assure-constant ( constant -- quot )
     dup word? [ bad-math-inverse ] when 1quotation ;
@@ -158,6 +155,7 @@ ERROR: missing-literal ;
     dup
     [ word? ] [ symbol? not ] bi and
     [ missing-literal ] when ;
+
 \ + [ - ] [ - ] define-math-inverse
 \ - [ + ] [ - ] define-math-inverse
 \ * [ / ] [ / ] define-math-inverse
@@ -175,6 +173,7 @@ DEFER: __
 
 : both ( object object -- object )
     dupd assert= ;
+
 \ both [ dup ] define-inverse
 
 {
@@ -277,6 +276,7 @@ DEFER: __
 MACRO: matches? ( quot -- quot' ) [matches?] ;
 
 ERROR: no-match ;
+
 M: no-match summary drop "Fall through in switch" ;
 
 : recover-chain ( seq -- quot )