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

Decompiler Feature Request: re-sugar list and array range expressions #30

Closed
GoogleCodeExporter opened this issue Jun 21, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

e.g., all of the following should be re-sugared:

> <@ [1..5] @> |> unquote;;

Seq.toList (seq {1..5})
Seq.toList (seq seq [1; 2; 3; 4; ...])
Seq.toList seq [1; 2; 3; 4; ...]
[1; 2; 3; 4; 5]

val it : unit = ()
> <@ [1..5..10] @> |> unquote;;

Seq.toList (seq {1..5..10})
Seq.toList (seq seq [1; 6])
Seq.toList seq [1; 6]
[1; 6]

val it : unit = ()
> <@ [|1..10|] @> |> unquote;;

Seq.toArray (seq {1..10})
Seq.toArray (seq seq [1; 2; 3; 4; ...])
Seq.toArray seq [1; 2; 3; 4; ...]
[|1; 2; 3; 4; 5; 6; 7; 8; 9; 10|]

val it : unit = ()
> <@ [|1..5..10|] @> |> unquote;;

Seq.toArray (seq {1..5..10})
Seq.toArray (seq seq [1; 6])
Seq.toArray seq [1; 6]
[|1; 6|]

val it : unit = ()

Original issue reported on code.google.com by stephen....@gmail.com on 1 Apr 2011 at 3:58

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