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

Simplification of improper lists #41

Closed
justinethier opened this issue Aug 29, 2011 · 2 comments
Closed

Simplification of improper lists #41

justinethier opened this issue Aug 29, 2011 · 2 comments
Milestone

Comments

@justinethier
Copy link
Owner

The following quoted expression is simplified in other implementations such as Chicken:

'(1 2 . (3 . ()))
=> (1 2 3)

husk should do this a well.

@justinethier
Copy link
Owner Author

See also http://community.schemewiki.org/?scheme-faq-language#dottedapp

Note, however, that most Schemes expand literal lists occurring in function applications, e.g. (foo bar . (1 2 3)) is expanded into (foo bar 1 2 3) by the reader. It is not entirely clear whether this is a consequence of the standard - the notation is not part of the R5RS grammar but there is strong evidence to suggest a Scheme implementation cannot comply with all of R5RS without performing this transformation.

justinethier added a commit that referenced this issue Aug 30, 2011
justinethier added a commit that referenced this issue Sep 11, 2011
…verting the whole construct into a proper list. However, added a special exception for unquoted lists to allow them to work as intended.
@justinethier
Copy link
Owner Author

This functionality has now been added to the parser.

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

1 participant