From 0d322b92df6b866536a32e981a642605dc1b3560 Mon Sep 17 00:00:00 2001 From: David Ashby Date: Sat, 20 Feb 2021 19:13:28 -0500 Subject: [PATCH] define /MOD in prosper, not as a built-in --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 0fc329f..c2351f4 100644 --- a/main.go +++ b/main.go @@ -40,7 +40,7 @@ func main() { dict.AddWord("*", Word{Name: "*", Impl: b.Mul(&stack)}) dict.AddWord("/", Word{Name: "/", Impl: b.Div(&stack)}) dict.AddWord("MOD", Word{Name: "MOD", Impl: b.Mod(&stack)}) - dict.AddWord("/MOD", Word{Name: "/MOD", Impl: b.DivMod(&stack)}) + dict.AddWord("/MOD", Word{Name: "/MOD", Source: []string{"2DUP", "MOD", "ROT", "ROT", "/"}}) dict.AddWord("+1", Word{Name: "+1", Source: []string{"1", "+"}}) dict.AddWord("-1", Word{Name: "-1", Source: []string{"1", "-"}}) dict.AddWord("ABS", Word{Name: "ABS", Source: []string{"DUP", "0<", "IF", "NEGATE", "THEN"}})