fp in scala assignment