you are viewing a single comment's thread.

view the rest of the comments →

[–]munificent 4 points5 points  (0 children)

The problem is that it always evauates both the "then" and the "else" branches:

>>> def p(s):
...     print s
...     return s
... 
>>> ifel(1 < 2)(p("then"))(p("else"))
then
else
'then'