Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.

Conversation

@samth
Copy link

@samth samth commented Nov 17, 2021

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
Copy link
Author

samth commented Nov 17, 2021

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
Copy link
Author

samth commented Nov 18, 2021

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

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant