Study of fp with scala