define /MOD in prosper, not as a built-in
This commit is contained in:
parent
fee9325155
commit
0d322b92df
2
main.go
2
main.go
@ -40,7 +40,7 @@ func main() {
|
|||||||
dict.AddWord("*", Word{Name: "*", Impl: b.Mul(&stack)})
|
dict.AddWord("*", Word{Name: "*", Impl: b.Mul(&stack)})
|
||||||
dict.AddWord("/", Word{Name: "/", Impl: b.Div(&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.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("-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"}})
|
dict.AddWord("ABS", Word{Name: "ABS", Source: []string{"DUP", "0<", "IF", "NEGATE", "THEN"}})
|
||||||
|
Loading…
Reference in New Issue
Block a user