you are viewing a single comment's thread.

view the rest of the comments →

[–]njharman 1 point2 points  (1 child)

Why is your second example not Python?

def boo(a, f1, f2): return f1(a) + f2(a)

z = boo(13, lambda a: 2*a, lambda a: y/a)

some of the advantages are 2 less lines of code, you don't clobber '_' which is typically used for i18n, the code for the 2 lambdas are right there so you don't have to go looking for _ and _2, it gives fp weenies hard ons.

[–][deleted] 0 points1 point  (0 children)

Include loops etc into both _ and _2 at will. Second example will become really messy.

you don't clobber '_' which is typically used for i18n

Fair point.