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

Feature request: Ruby lambdas #74

Closed
firedev opened this issue Jun 9, 2015 · 3 comments
Closed

Feature request: Ruby lambdas #74

firedev opened this issue Jun 9, 2015 · 3 comments

Comments

@firedev
Copy link

firedev commented Jun 9, 2015

Hi,

It would be great if I could get rid of the old Ruby lambda syntax lambda { |x| } and convert:

lambda { |x| whatever(x) }

->(x) { whatever(x) }

This is one-way transformation. But the next one should be reversible:

->(x) { whatever(x) }

lambda do |x|
  whatever(x)
end

Please let me know what you think as this might be hard to make.

@firedev
Copy link
Author

firedev commented Jun 9, 2015

Sorry this should go to Switch.

@AndrewRadev
Copy link
Owner

It's kind of hard to say where it should go, because it would work in both cases :). There's actually an issue about this already, #65, but I'm starting to think it'll be a lot easier to implement this in terms of switch. I'll write more in the switch issue.

@AndrewRadev
Copy link
Owner

Since the issue was discussed in more detail in my switch plugin, I'll go ahead and close this one.

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

No branches or pull requests

2 participants