From: Clyne Sullivan Date: Mon, 5 Dec 2022 00:35:32 +0000 (-0500) Subject: day2: fix forth solution X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=11f2b58b189c93dd7e7f5431717da92a33eceedc;p=clyne%2Fadvent-of-code.git day2: fix forth solution --- diff --git a/day2/both-clean.forth b/day2/both-clean.forth index 38f27b7..4739568 100644 --- a/day2/both-clean.forth +++ b/day2/both-clean.forth @@ -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