interface Tree<K> { void insert (K key); } Tree<String> t = ... ; t.insert ("foo");
interface Tree<K> { Tree<K> insert (K key); } Tree<String> t = ... ; Tree<String> u = t.insert ("foo");
insert :: Tree k -> k -> Tree k