[darcs-devel] darcs patch: add test case for replacing tokens with ... (and 3 more)

Taral taralx at gmail.com
Mon May 30 13:02:28 PDT 2005


On 5/29/05, Ian Lynagh <igloo at earth.li> wrote:
> > +    sal_last (ps:pss)
> > +     | null pss = lastPS ps
> > +     | otherwise = sal_last pss
> > +    sal_last [] = error "sal_last []"
> 
> FWIW, this definition seems more natural to me:
> 
>     sal_last [] = error "sal_last []"
>     sal_last [ps] = lastPS ps
>     sal_last (_:pss) = sal_last pss

I prefer:

    sal_last = lastPS . last

-- 
JP Sugarbroad <taralx at gmail.com>




More information about the darcs-devel mailing list