efficiently compose operations over sequences