I am not sure if someone has proposed with
before:
xs.map with x => x + 1
.foldLeft(4) with (x, y) => x + y
xs.groupMap
with group = x => foo(x)
with map = x => x.toString
obj.foo
with a = bla, b = bla
using cap1, cap2
If it is possible to write e with e1, e2, ...
to mean e(e1, e2, ...)
, it seems to have the potential to (1) reduce the usage of parenthesis, (2) deal with long arguments(such as lambdas) and (3) works very well with named arguments.
However, I’m not sure it makes sense technically — disambiguation seems to be complicated.