Teaching functional patterns through robotic applications