]> code.bitgloo.com Git - clyne/advent-of-code.git/commitdiff
day2: fix forth solution
authorClyne Sullivan <clyne@bitgloo.com>
Mon, 5 Dec 2022 00:35:32 +0000 (19:35 -0500)
committerClyne Sullivan <clyne@bitgloo.com>
Mon, 5 Dec 2022 00:35:32 +0000 (19:35 -0500)
day2/both-clean.forth

index 38f27b777c54fa79fe9e0c2e2117f1cd63b9c2b1..47395688a7d0958d0a0133d525c83c7e1bcca548 100644 (file)
@@ -2,7 +2,7 @@
 2 constant paper
 3 constant scissors
 
-: is-win ( them us -- yes ) - dup <0 swap 2 = or ;
+: is-win ( them us -- yes ) - dup -1 = swap 2 = or ;
 
 : get-score ( them us -- score )
   2dup is-win if 6 + else