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

functions should be values #296

Open
JonathanAldrich opened this issue Jan 22, 2019 · 1 comment
Open

functions should be values #296

JonathanAldrich opened this issue Jan 22, 2019 · 1 comment

Comments

@JonathanAldrich
Copy link
Member

Allow a function defined with "def" to be used as a value (of arrow type). For example:

def f(x:Int):Int = x

list.map(f)

We may want to consider using an operator, e.g.

list.map(&f)
@JonathanAldrich
Copy link
Member Author

JonathanAldrich commented Jan 22, 2019

May also want to have a way to capture functions from an object, for example

list.map(o.f)

for some function f of object o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant