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

auto-lambda #29

Open
gelisam opened this issue Aug 10, 2013 · 0 comments
Open

auto-lambda #29

gelisam opened this issue Aug 10, 2013 · 0 comments

Comments

@gelisam
Copy link
Collaborator

gelisam commented Aug 10, 2013

Swap can be written as:

> printf "1\t2" | hsl swap

or equivalently

> printf "1\t2" | hsl '\(x,y) -> (y,x)'

With implicit arguments, we should be allowed to write it as:

> printf "1\t2" | hsl '(_2, _1)'

I think it would also be useful to support _0 for the entire argument, for those cases where pointfree style is inconvenient:

> seq 10 | hsl 'take 2 _0 ++ drop (length _0 - 2) _0'
1
2
9
10
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