Add 'apply' primitive