simplicity!

Antoine R. Dumont
https://github.com/ardumont
https://coderwall.com/ardumont
http://twitter.com/ardumont
http://adumont.fr/blog


On Tue, Oct 15, 2013 at 7:29 PM, massyl <notifications@github.com> wrote:

> In src/Huffman.hs:
>
> >
> >  singleton :: [CodeTree] -> Bool
> > -singleton = ((== 1) . length)
> > +singleton xs = (null $ tail xs) && (length xs == 1)
>
> I've another more straightforward implementation lol. More easy lol. I'll
> push it tomorrow Just Singleton [x] = True Singleton _ = False Massyl
> … <#141bd2a10d9675cb_>
> On 15 oct. 2013, at 18:42, "Antoine R. Dumont" <notifications@github.com>
> wrote: In src/Huffman.hs: > > singleton :: [CodeTree] -> Bool > -singleton
> = ((== 1) . length) > +singleton xs = (null $ tail xs) && (length xs == 1)
> Great, deal with empty list! — Reply to this email directly or view it on
> GitHub.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/ardumont/haskell-lab/pull/1/files#r6978069>
> .
>