KacperFKorban / GUInep

Automatic UI forms for Scala 3 functions
https://kacperfkorban.github.io/GUInep/
Apache License 2.0
14 stars 0 forks source link

Run function lifting and named form refs #32

Closed KacperFKorban closed 5 months ago

KacperFKorban commented 5 months ago

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