by ajuc · 4y ago · 0 comments
My solution: array of lambdas
Your solution: array of references to functions named f1 .. f20.
Which is cleaner?
That's why you write functions like this:
def testXIsYAfterSettingAToBAndCToD():
A = B;
C = D;
assert(X == Y);
So much meaning provided by the name ;)* if anyone not get it, ts/js can declare a key-value lambda like:
let myFunc = {f1: () => , f2: () => } and so on. It can be called by string key like myFunc["f1"](), and all it's props can be get by Object.keys(myFunc) so it can be randomized easily.