2 ms·
Yes, it did strike me how JS and Ruby are hard to read compared to Python's "if x in [a, b, c]". Moreover, the memoise part is better handled with a decorator:
by gbog 15y ago
Yes, it did strike me how JS and Ruby are hard to read compared to Python's "if x in [a, b, c]".
Moreover, the memoise part is better handled with a decorator: it is a special behavior of the function and don't relate to its logic (its body).