Skip to main content
deleted 1 characters in body
Source Link
kevin cline
  • 33.8k
  • 3
  • 73
  • 143

If you are designing from a Karnaugh map, then the code may as well look that way too:

// a b def actionMap = [ false: [false: { z() }, true: { z() }], true: [false: { x() }, true: { y() }]] actionMap[a][b](); 

If you are designing from a Karnaugh map, then the code may as well look that way too:

// a b def actionMap = [ false: [false: { z() }, true: { z() }], true: [false: { x() }, true: { y() }]] actionMap[a][b](); 

If you are designing from a Karnaugh map, then the code may as well look that way too:

// a b def actionMap = [ false: [false: { z() }, true: { z() }], true: [false: { x() }, true: { y() }]] actionMap[a][b]() 
Source Link
kevin cline
  • 33.8k
  • 3
  • 73
  • 143

If you are designing from a Karnaugh map, then the code may as well look that way too:

// a b def actionMap = [ false: [false: { z() }, true: { z() }], true: [false: { x() }, true: { y() }]] actionMap[a][b]();