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

Layout generation for recursive lambda sets #3738

Merged
merged 20 commits into from
Aug 11, 2022
Merged

Layout generation for recursive lambda sets #3738

merged 20 commits into from
Aug 11, 2022

Conversation

ayazhafiz
Copy link
Sponsor Member

@ayazhafiz ayazhafiz commented Aug 9, 2022

Adds support for recursive and nullable-unwrapped lambda sets, so things like this work now:

» compose = \f, g -> \x -> g (f x)
…
… identity = \x -> x
… exclaim = \s -> "\(s)!"
… whisper = \s -> "(\(s))"
…
… res: Str -> Str
… res = List.walk [ exclaim, whisper ] identity compose
… res "hello"

"(hello!)" : Str

Closes #3444

@ayazhafiz ayazhafiz changed the title WIP layout generation for recursive lambda sets Layout generation for recursive lambda sets Aug 9, 2022
Copy link
Contributor

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, a major missing lambda set feature!

@folkertdev folkertdev merged commit ae0e90c into trunk Aug 11, 2022
@folkertdev folkertdev deleted the i3444 branch August 11, 2022 08:22
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.

Compiler stack-overflows when compiling a walk over a list with closures
2 participants