Can Models Learn Skill Composition from Examples?