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

Run function lifting and named form refs #32

Merged
merged 5 commits into from
Mar 23, 2024
Merged

Run function lifting and named form refs #32

merged 5 commits into from
Mar 23, 2024

Conversation

KacperFKorban
Copy link
Owner

This PR implements the support for recursive data structures

e.g.

enum IntTree:
  case Leaf
  case Node(left: IntTree, value: Int, right: IntTree)

def isInTree(elem: Int, tree: IntTree): Boolean = tree match
  case IntTree.Leaf => false
  case IntTree.Node(left, value, right) =>
    value == elem || isInTree(elem, left) || isInTree(elem, right)

closes #29

@KacperFKorban KacperFKorban merged commit 14c8caf into main Mar 23, 2024
1 check passed
@KacperFKorban KacperFKorban deleted the run-lift branch March 23, 2024 15:02
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.

Support recursive structures
1 participant