On 09-Sep-1999, Christian Sievers <[EMAIL PROTECTED]> wrote:
> Jon Fairbairn wrote:
> 
> > [3] I think this example is slightly easier, though on second thoughts
> > 
> >     unzip [('a', 1), ('b', 2), ('c', 3)] = (['a', 'b', 'c'], [1, 2, 3])
> > 
> >     is better still.
> 
> It's a good idea to use two different types in an example, but Char
> is not well chosen, because the canonical way to write the above
> result is ("abc",[1,2,3]). Bool might be a better choice, although it
> only has two values with quite long names.

I think using Char would be OK, but if you don't like Char,
then use String:

     unzip [("a", 1), ("b", 2), ("c", 3)] = (["a", "b", "c"], [1, 2, 3])

-- 
Fergus Henderson <[EMAIL PROTECTED]>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]        |     -- the last words of T. S. Garp.


Reply via email to