Various scala based experiments of functional programming