ch 4 fp in scala ph 1