Fun prog in scala