[Haskell-cafe] adding the elements of two lists

Ozgur Akgun ozgurakgun at gmail.com
Thu Mar 29 22:36:57 CEST 2012


On 29 March 2012 04:34, Richard O'Keefe <ok at cs.otago.ac.nz> wrote:

> u f (PS x)        = PS $ map f x
> b f (PS x) (PS y) = PS $ zipWith f x y
> to_ps x           = PS (x : repeat 0)
>

Also see: http://hackage.haskell.org/package/newtype

-- 
Ozgur Akgun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120329/98e23a80/attachment-0001.htm>


More information about the Haskell-Cafe mailing list