[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] seq-let c856843: New macro seq-let, providing destruct

From: Nicolas Petton
Subject: Re: [Emacs-diffs] seq-let c856843: New macro seq-let, providing destructuring support to seq.el
Date: Fri, 01 May 2015 23:35:46 +0200

Stefan Monnier writes:

>> Wouldn't that be for a difference usage? If not, can you provide an
>> example?
> You could use it as in
>    (pcase-let (((seq a b) [1 2 3]))
>      (message "%s %s" a b))
> which could return "1 2", tho that depends how you'd define the (seq
> ...) pattern, obviously.

I see, it would indeed makes sense to have it.  I'll have a look at how
pcase works internally and how patterns can be defined.

I think having both would make sense though as `seq-let' is IMO simpler
to use.  Maybe one could reuse code from the other.

Nicolas Petton

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]