Thanks for your help, guys! I like simple solutions most of all :)<br> On Fri, Jul 11, 2008 at 9:44 PM, Reid Barton <<a href="mailto:rwbarton@math.harvard.edu">rwbarton@math.harvard.edu</a>> wrote:<br><br> This doesn't require any fancy data structures.<br>
Instead store this as a list of pairs [([10,6,80,25,6,7], 5), ...]<br> and it'll be easy to write a recursive function that accepts a new<br> vector and either increments the appropriate count or adds the new<br>
vector at the end with count 1.<br><br><div class="gmail_quote">On Fri, Jul 11, 2008 at 11:32 PM, Dan Weston <<a href="mailto:westondan@imageworks.com">westondan@imageworks.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If you don't need to do error checking on the input syntax, the easiest (and arguably fastest) method is just read:<br>
<br>
Prelude> let x = "10, 6, 80, 25, 6, 7"<br>
Prelude> read ("[" ++ x ++ "]") :: [Int]<br>
[10,6,80,25,6,7]<br>
<br>
For error checking, you can use reads.<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Dmitri O. Kondratiev<br><a href="mailto:dokondr@gmail.com">dokondr@gmail.com</a><br><a href="http://www.geocities.com/dkondr">http://www.geocities.com/dkondr</a>