remove lambda function

I guess predicate object will be created N times by calling
enqueue/dequeue.