[Haskell-beginners] How would you write...

Daniel Hlynskyi abcz2.uprola at gmail.com
Tue Apr 22 16:30:31 UTC 2014


chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- [pappus 100 i
| i <- [1..10]] ]

better

chain1 = [transform $ pappus 100 i | i <- [1..10]]
  where transform (x,y,r) = translate x y $ color red $ Circle r


2014-04-22 16:58 GMT+03:00 Kim-Ee Yeoh <ky3 at atamo.com>:

>
> On Tue, Apr 22, 2014 at 3:00 PM, John M. Dlugosz <ngnr63q02 at sneakemail.com
> > wrote:
>
>> chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- pappus 100
>> [1..10] ]
>
>
> What is translate? What is color? What is Circle? What is pappus?
>
> None of this is plain haskell.
>
> John, if you make your readers guess at undefined names, they'll go away
> and hangout somewhere friendlier!
>
> -- Kim-Ee
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140422/bd9b8bb6/attachment.html>


More information about the Beginners mailing list