[Haskell-cafe] nub vs. find + (:) Is this abysmal code?

Felipe Lessa felipe.lessa at gmail.com
Sun Feb 10 10:22:35 EST 2008


On Feb 10, 2008 1:20 PM, Felipe Lessa <felipe.lessa at gmail.com> wrote:
> Maybe
>
> addProduct :: [Product] -> Product -> [Product]
> addProduct inventory p = p : delete p inventory

Oh, forget this, it will keep rewriting the tail of the list, which is
a Bad Thing (TM).

-- 
Felipe.


More information about the Haskell-Cafe mailing list