My example was to illustrate that a simple question such as "is the integer in this range" can't be answered with a single key in the dispatch table. This immediately followed my first assertion that the problem was each condition had to be an exact key. It was a simple example that illustrated the point.
I didn't bother moving on to more complex examples because I believe I had already made my point and because I referenced Roy Johnson's great tutorial - Implementing Dispatch Tables which covers these difficult cases and some work arounds.
Cheers - L~R
In reply to Re^5: Avoiding if/else knots
by Limbic~Region
in thread Avoiding if/else knots
by loris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |