[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 387e1e1: New version of `seq-let' based on a pc
Re: [Emacs-diffs] master 387e1e1: New version of `seq-let' based on a pcase pattern
Mon, 11 May 2015 11:06:31 -0400
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
> Yes. My idea of it was that you bind a sequence like the following:
> (seq [a b [c d]])
I was thinking of (seq a b (seq c d)).
You could add support for (seq a b [c d]), if you want since that
currently wouldn't collide with any pcase pattern, tho I'm not sure it's
worth the added complexity for the user.
> But then how can I have `seq-let' work the way it did until now? For
> (seq-let [a [b [c]]] my-vector
You expand [a [b [c]]] to (seq a (seq b (seq c))) before passing it to
>>> + (push `(app (seq--reverse-args #'seq--nested-elt
>>> + (reverse (cons ,index
>>> + ,name)
>> This reverse plus seq--reverse-args business seems
>> hideously inefficient. Why do you need that?
> because of the way the `app' pattern works. Or maybe I'm missing
`(app (seq--nested-elt ',(reverse (cons index nested-indexes))) ,name)
work as well? Or, once you get rid of the nested case,
`(app (seq-elt ,index) ,name)