[Haskell] Tuples & Lists
Brandon Allbery
allbery.b at gmail.com
Tue Aug 14 04:48:52 CEST 2012
On Mon, Aug 13, 2012 at 9:06 PM, KC <kc1956 at gmail.com> wrote:
> "This part of the conditional can be written more succinctly as:
>
> all (== test_lcv) [init_lcv, update_lcv, update_lcv']"
>
> Wouldn't this be be better as tuple avoiding list overhead or does ghc
> optimize it out?
>
Haskell tuples don't work that way, and if they did they would be no better
than lists. You may be thinking of Python tuples, which are more like
Haskell's lists (whereas Python's lists are somewhat more like Haskell's
arrays).
--
brandon s allbery allbery.b at gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell/attachments/20120813/74b9913a/attachment.htm>
More information about the Haskell
mailing list