can you make anonymous functions with more than 1 expression now?
For example, Python's with statement could have been entirely programmed as a library function if lambas supported code blocks:
with(open("file.txt"), lambda f:
content = f.read()
return sum(int(c) for c in content.split(" "))
)
Functional languages usually have a pretty limited "core" and implement most of their features through their standard library, usually using higher-order functions, overloaded operators ... def _(f):
content = f.read()
return sum(int(c) for c in content.split(" "))
with(open("file.txt"), _) val = my_list.reduce(foobar)
What is even going on here?