First i have type declaration for binary tree:
sealed trait BT[+A] case object Empty extends BT[Nothing] case class Node[+A](elem:A, left:BT[A], right:BT[A]) extends BT[A];; And further i have this code for inorder traversal with this mystery looking operator " ::: ".
What does this operator " ::: " exactly mean in this code?
def inorder[A](tree: BT[A]): List[A] = { tree match { case Node(v,l,r) =>(inorder(l)) ::: (v::(inorder(r))) case Empty => Nil } }