starting studies about functions in scala