3 ms·
The code preceding that is actually pretty simple if you translate it to Haskell: my_if test result alternative = if test then result else alternative It'
by sketerpot 16y ago
The code preceding that is actually pretty simple if you translate it to Haskell:
my_if test result alternative = if test then result else alternative
It's just trying to get currying and lazy evaluation in Python which causes all the ugliness.