Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Howto reverse a Data.Array (Timothy Washington)
----------------------------------------------------------------------
Message: 1
Date: Thu, 23 Jun 2016 00:58:24 -0700
From: Timothy Washington <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: [Haskell-beginners] Howto reverse a Data.Array
Message-ID:
<CAADtM-aLuBffgzFYE6Mq=STRjJG9cDccc8JiLfnvO=bhvy6...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
I'm still trying to get an intuitive understanding of Haskell's Data.Array
<http://hackage.haskell.org/package/array-0.5.1.1/docs/Data-Array.html#g:5>,
in contrast to Data.List or Data.Vector.
I very much want a nested array (a matrix), where the parent list (or rows)
are reversed. But neither *A.array* nor *A.istArray* allow indicies to be
reversed in their constructors, nor the list comprehensions that generate
the elements
The only reason I'm using an array, is for the *A.//* function (operating
on a matrix). Otherwise, I'd use Data.Vector
<https://hackage.haskell.org/package/vector-0.11.0.0/candidate/docs/Data-Vector.html>
which does have a reverse function, but a less powerful *V.//* , that
doesn't accept coordinates in a matrix.
Can I reverse a Data.Array? If not, then why.
Thanks
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20160623/86086518/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 96, Issue 14
*****************************************