functiona programming ex