Skip to content

Instantly share code, notes, and snippets.

@cbeust
Created February 7, 2017 20:17
Show Gist options
  • Save cbeust/70e40b39d50b355877efbb2fab5fa7f2 to your computer and use it in GitHub Desktop.
Save cbeust/70e40b39d50b355877efbb2fab5fa7f2 to your computer and use it in GitHub Desktop.
class Node(override val value: String,
override val children: List<Node> = emptyList()) : INode<String>
class Tree(val payload: Int, val leaves: List<Tree>) : INode<Int> {
override val children: List<Tree> = leaves
override val value: Int = payload
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment