[Haskell-beginners] Searching for word in 2D array
Ozgur Akgun
ozgurakgun at gmail.com
Fri Mar 23 16:41:36 CET 2012
On 23 March 2012 10:06, Lorenzo Bolla <lbolla at gmail.com> wrote:
> I'm not sure Data.Set would work, because afaik, Sets don't preserve
> ordering: so a row like "abc" and "cab" would be represented by the same
> Set.
>
What?
Yes, Data.Set doesn't preserve any ordering between the members of it. It
doesn't modify the members themselves and shuffle their content though. Try
it for yourself:
ghci> S.fromList ["abc", "cab"]
ghci> S.fromList ["abc", "cab", "abc"]
Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120323/d5cc990a/attachment.htm>
More information about the Beginners
mailing list