Skip to content

Instantly share code, notes, and snippets.

@cbeust
Created February 7, 2017 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbeust/5e9320be92d8087e4087b03ee4ca58cd to your computer and use it in GitHub Desktop.
Save cbeust/5e9320be92d8087e4087b03ee4ca58cd 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