On some occasions, being able to pass named arguments to macros would be useful.
Use case, related to the multilambda macro in unpythonic (rackety lambda with implicit begin, for Python):
from multilambda import macros, λ
myadd = λ(x, y)[print(x, y), x + y]
assert myadd(2, 3) == 5
echo = λ(x='hi there')[print(x), x] # doesn't work, needs named arg support
(Usage, implementation.)
For the same use case, *args and **kwargs support would be really nice. :)
Thoughts?
[edit] update link.
[edit2] these links are now obsolete; the silly λ macro has been removed.
On some occasions, being able to pass named arguments to macros would be useful.
Use case, related to the multilambda macro in unpythonic (rackety lambda with implicit begin, for Python):
(Usage, implementation.)
For the same use case,
*argsand**kwargssupport would be really nice. :)Thoughts?
[edit] update link.
[edit2] these links are now obsolete; the silly λ macro has been removed.