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

Adds a handy matchPatterns method to case macros. #441

Merged
merged 2 commits into from
Dec 29, 2014

Conversation

trxcllnt
Copy link
Contributor

No description provided.

@BrendanEich
Copy link

Would a standard flatMap for Arrays help? It would flatten to arbitrary depth.

Nit: some if( and while( no-space-before-left-paren sightings later in patch.

/be

@trxcllnt
Copy link
Contributor Author

@BrendanEich getting flatMap on the Array prototype would be very helpful. This flatten function collapses an n-dimension Array into an Array of Arrays, which is trivial to compose via recursive flatMaps.

@disnet disnet merged commit a7d6109 into sweet-js:master Dec 29, 2014
@disnet
Copy link
Member

disnet commented Dec 29, 2014

Looks good!

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

Successfully merging this pull request may close these issues.

3 participants