From abb17553112c42d46988f811f3a765f5dd9ae5f9 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 16 May 2020 11:26:16 -0700 Subject: [PATCH] logic.examples.money: use lnth and leach. --- extra/logic/examples/money/money.factor | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extra/logic/examples/money/money.factor b/extra/logic/examples/money/money.factor index 110f3df189..02b9ffefb1 100644 --- a/extra/logic/examples/money/money.factor +++ b/extra/logic/examples/money/money.factor @@ -46,15 +46,15 @@ LOGIC-VARS: S E N D M O R Y A L G B T :: S-and-M-can't-be-zero ( seq -- seq' ) seq [| hash | - 1 hash N1 of list>array nth 0 = not - 1 hash N2 of list>array nth 0 = not and + 1 hash N1 of lnth 0 = not + 1 hash N2 of lnth 0 = not and ] filter ; :: print-puzzle ( hash-array -- ) hash-array [| hash | - " " printf hash N1 of list>array [ "%d " printf ] each nl - "+ " printf hash N2 of list>array [ "%d " printf ] each nl + " " printf hash N1 of [ "%d " printf ] leach nl + "+ " printf hash N2 of [ "%d " printf ] leach nl "----------------" printf nl - " " printf hash N of list>array [ "%d " printf ] each nl nl + " " printf hash N of [ "%d " printf ] leach nl nl ] each ;