Category "abstract-data-type"

Java interface loose coupling advantages in realworld?

Can someone help me out, I read some Java tight and loose coupling article. I had certain doubts in loose coupling watched several YouTube videos and articles,

Writing Algebraic Data Type in Scala

In Haskell, I can define a Tree: data Tree a = Empty | Node a (Tree a) (Tree a) How could I write this in Scala? I'm not sure how to keep the type paramete