]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/adsoda/solution2/solution2.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / extra / adsoda / solution2 / solution2.factor
index 3e0648128de9746937e1e4b4a87b6f33212693be..fa73120df364a11d1c3421971cc3768b85d0119a 100755 (executable)
@@ -66,7 +66,7 @@ SYMBOL: matrix
 : do-row ( exchange-with row# -- )\r
     [ exchange-rows ] keep\r
     [ first-col ] keep\r
-    dup 1+ rows-from clear-col ;\r
+    dup 1 + rows-from clear-col ;\r
 \r
 : find-row ( row# quot -- i elt )\r
     [ rows-from ] dip find ; inline\r
@@ -76,8 +76,8 @@ SYMBOL: matrix
 \r
 : (echelon) ( col# row# -- )\r
     over cols < over rows < and [\r
-        2dup pivot-row [ over do-row 1+ ] when*\r
-        [ 1+ ] dip (echelon)\r
+        2dup pivot-row [ over do-row 1 + ] when*\r
+        [ 1 + ] dip (echelon)\r
     ] [\r
         2drop\r
     ] if ;\r