Consider a dispatch table.
See, especially, replies to elsif chain vs. dispatch and (node) Re: replace conditionals with polymorphism.
In reply to Re: Fixing cascading if-elsif-else statements
by ww
in thread Fixing cascading if-elsif-else statements
by walkingthecow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |