• + 0 comments

    task can be solved without zipper and everything is immutable just put the tree and navigation into two different structures

    final case class Node(value: Int, children: Vector[Node] = Vector.empty)
    final case class PathNode(link: Node, pos: Int, parent: Option[Node])