-
Notifications
You must be signed in to change notification settings - Fork 0
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
Functions #4
Projects
Comments
Now I'm starting to like arrows:
Hmm, also I think:
or
|
Also, calling functions maybe force the argument to have the name?
vs
|
I've seen a lot of languages do pipe operators so you can do:
as
But I'm wondering how this would look in bee, this a first pass:
This is interesting because it's the opposite of |
Oh, also, with that we can also do promises as |
Type annotations for functions
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Defining a function will return a Function object.
A Function can only take one argument, but that argument can be an Index List or Pair List.
Single line function definitions are expressed thusly:
For multiple arguments you can express it thusly:
Defaults can be expressed as such:
Multiline functions are expressed thusly (Only the last line is returned):
Function invocation is expressed thusly:
For multiple arguments you would express it thusly:
Of course for currying you would express thusly:
And currying with multiline is express thusly:
The text was updated successfully, but these errors were encountered: