Thanks for your help, guys!  I like simple solutions most of all  :)
 On Fri, Jul 11, 2008 at 9:44 PM, Reid Barton <[EMAIL PROTECTED]>
wrote:

    This doesn't require any fancy data structures.
    Instead store this as a list of pairs [([10,6,80,25,6,7], 5), ...]
    and it'll be easy to write a recursive function that accepts a new
    vector and either increments the appropriate count or adds the new
    vector at the end with count 1.

On Fri, Jul 11, 2008 at 11:32 PM, Dan Weston <[EMAIL PROTECTED]>
wrote:

> If you don't need to do error checking on the input syntax, the easiest
> (and arguably fastest) method is just read:
>
> Prelude> let x = "10, 6, 80, 25, 6, 7"
> Prelude> read ("[" ++ x ++ "]") :: [Int]
> [10,6,80,25,6,7]
>
> For error checking, you can use reads.
>
>


-- 
Dmitri O. Kondratiev
[EMAIL PROTECTED]
http://www.geocities.com/dkondr
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to