shrubbery-rhombus-0 icon indicating copy to clipboard operation
shrubbery-rhombus-0 copied to clipboard

Initial implementation of Scala-style implicit functions.

Open samth opened this issue 3 years ago • 2 comments

Following the style of the fancy-app package. Does not handle operators yet, nor does it handle ..

This makes f(_,1) expand to fun(x): f(x,1).

Main design question is the behavior of multiple _ in the application. This PR causes each _ to become a distinct function argument, in order of their appearance. Alternative designs:

  • multiple _ all become the same binding
  • multiple _ are illegal

samth avatar Nov 17 '21 21:11 samth

It's not yet clear to me from the enforestation document (probably just because I don't know the implementation well enough) where I would put similar code to handle _.x or _ + 1.

samth avatar Nov 17 '21 22:11 samth

This now handles _.x and _(x).

samth avatar Nov 18 '21 17:11 samth