[Haskell-cafe] (no subject)
Erik Hesselink
hesselink at gmail.com
Tue Nov 29 08:13:28 CET 2011
On Mon, Nov 28, 2011 at 23:55, Willem O <dubl-u at hotmail.com> wrote:
> And I added this function:
> createPoint :: Int -> Point
> createPoint x = Point x
> When I loaded the file containing all this into ghci and executed 'Vector $
> map createPoint [1..5]' the result was '(1, 2, 3, 4, 5)' (without the
> quotes).
Note that you do not need this function. You can just use the 'Point'
constructor:
map Point [1..5]
Erik
More information about the Haskell-Cafe
mailing list