Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function statements #31

Open
matthew-healy opened this issue Nov 20, 2023 · 0 comments
Open

Function statements #31

matthew-healy opened this issue Nov 20, 2023 · 0 comments

Comments

@matthew-healy
Copy link
Owner

matthew-healy commented Nov 20, 2023

Instead of:

let add = |x, y| x + y in
add 3 4

something like:

def add |x, y| x + y

x + y

This should probably just be syntactic sugar initially, to avoid making too many assumptions about how wider statements should work. In particular, function statements can only reference functions defined earlier in the file (or themselves) and must be followed by exactly one expression.

@matthew-healy matthew-healy moved this to Todo in uplp Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant