Haskell like (c:cs) syntax

Carl Banks pavlovevidence at gmail.com
Thu Aug 30 01:26:05 CEST 2007

On Tue, 28 Aug 2007 17:30:47 -0500, Erik Jones wrote:
> On Aug 28, 2007, at 5:12 PM, Chris Mellon wrote:
>> When working with lists, Python has a slice syntax (which is rather
>> more powerful than Haskells limited head->tail linked list syntax) that
>> you can use to chop a sequence up into various parts.
> That is extremely arguable (in fact, Haskell's list semantics are
> extremely powerful as they are not limited to just head/tail).

Apples and oranges, really.  Pattern matching can do an awful lot of cool 
things, but arbitrary slicing isn't one of the more pleasant ones.  (At 
least not without a good set of slice-matching patterns handy, which I 
don't know if Haskell has.)

Carl Banks

More information about the Python-list mailing list