Ketil Malde schrieb:
[...]
>>> I don't think there would be any doubt what 'deleteBy (<= 5) [1..10]'
>>> would do.
>> Well, if you don't know about filter, you could think it deletes all 
>> elements satisfying the predicate, but apart from that, it's clear.
> 
> I'd probably call it 'filter1', but that's just my personal convention.

I've called it 'deleteFirst' in
http://hackage.haskell.org/trac/ghc/ticket/3399

I would expect it to be more efficient than filter (with a negated
predicate), because no further comparisons are necessary once the
element to be deleted has been found.

C.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to