Apply primitive functions