arturo icon indicating copy to clipboard operation
arturo copied to clipboard

[VM/values/logic] Add `Nand`, `Nor`, etc helpers

Open github-actions[bot] opened this issue 2 years ago • 0 comments

[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

github-actions[bot] avatar Aug 03 '22 11:08 github-actions[bot]