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"}})