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

Support something similar to . and : from lua #15

Open
FrankBro opened this issue Jan 18, 2019 · 0 comments
Open

Support something similar to . and : from lua #15

FrankBro opened this issue Jan 18, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@FrankBro
Copy link
Owner

Since some records might have something similar fields that would be similar to members in F#, we might want a notation to allow calling the member of a record with the record itself being passed as the first argument, similar to the way . and : works in lua.

For example

let record = { a = 1, b = 2, add = fun r -> r.a + r.b }

let list_of_records = (* something *)

list_of_records
|> List.map (fun record -> record.add)
(* bad *)

list_of_records
|> List.map (.add)
@FrankBro FrankBro added the enhancement New feature or request label Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant