arturo
arturo copied to clipboard
[VM/values/logic] Add `Nand`, `Nor`, etc helpers
[VM/values/logic] Add Nand
, Nor
, etc helpers
Since we already have helper methods for AND, OR, NOT, XOR - why not add the remaining ones, instead of having hack-ish code in our Arithmetic module?
https://github.com/arturo-lang/arturo/blob/ce734e7a32c73173910cdf8f533f56be21febe3b/src/vm/values/logic.nim#L19
#=======================================
# TODO(VM/values/logic) Add `Nand`, `Nor`, etc helpers
# Since we already have helper methods for AND, OR, NOT, XOR - why not add the remaining ones, instead of having hack-ish code in our Arithmetic module?
# labels: vm, values, enhancement
func And*(x,y: logical): logical =
if x==False: return False
if y==False: return False
ndex 386c709a5..1eb1d2eea 100644
++ b/src/vm/values/printable.nim
83b0e204420b0728de70d370c1a347434ca0bc9c