X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=extra%2Fadsoda%2Fsolution2%2Fsolution2.factor;h=fa73120df364a11d1c3421971cc3768b85d0119a;hp=3e0648128de9746937e1e4b4a87b6f33212693be;hb=3f3d57032bf29190e9bee12d168a4bce6d74653c;hpb=cd1bb8f4c8afba318249c7b756a45aa1c46ea51e diff --git a/extra/adsoda/solution2/solution2.factor b/extra/adsoda/solution2/solution2.factor index 3e0648128d..fa73120df3 100755 --- a/extra/adsoda/solution2/solution2.factor +++ b/extra/adsoda/solution2/solution2.factor @@ -66,7 +66,7 @@ SYMBOL: matrix : do-row ( exchange-with row# -- ) [ exchange-rows ] keep [ first-col ] keep - dup 1+ rows-from clear-col ; + dup 1 + rows-from clear-col ; : find-row ( row# quot -- i elt ) [ rows-from ] dip find ; inline @@ -76,8 +76,8 @@ SYMBOL: matrix : (echelon) ( col# row# -- ) over cols < over rows < and [ - 2dup pivot-row [ over do-row 1+ ] when* - [ 1+ ] dip (echelon) + 2dup pivot-row [ over do-row 1 + ] when* + [ 1 + ] dip (echelon) ] [ 2drop ] if ;