[Haskell-cafe] Prolog-style list syntax?
tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk
Mon Jun 28 18:27:54 UTC 2021
Me too, but is it really worth breaking language consistency for
something that can be done as a library?
Just xs = stripPrefix "prefix"
On Mon, Jun 28, 2021 at 08:22:00PM +0200, Jaro Reinders wrote:
> I have definitely wanted this for strings:
> "prefix" ++ xs = string
> Is much better than:
> 'p' : 'r' : 'e' : 'f' : 'i' : 'x' : xs = string
> On 28-06-2021 20:15, Viktor Dukhovni wrote:
> > On Mon, Jun 28, 2021 at 11:04:46AM -0700, Jeff Clites via Haskell-Cafe wrote:
> > > > how so? `x : y : z : zs`
> > >
> > > I don’t mind the existing either, but it would be interesting if this worked:
> > >
> > > [x, y, z] ++ zs = list
> > It is far from clear why this or any similar pattern would be more
> > ergonomic than:
> > x : y : z : zs
More information about the Haskell-Cafe