ParentFull threadmelolife·In Scala everything is an expression so you just use an if statement: val foo = if(x) y else zView on HN