[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pcase-setq
From: |
Michael Heerdegen |
Subject: |
Re: pcase-setq |
Date: |
Tue, 13 Oct 2015 17:52:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Hello Stefan,
Here is my first attempt, ignoring all optimizations:
--8<---------------cut here---------------start------------->8---
(defmacro pcase-setq (pattern exp)
(pcase--u
`((,(pcase--match exp (pcase--macroexpand pattern))
,(lambda (vars) `(progn ,@(mapcar (lambda (b) `(setq ,(car b) ,(cdr b)))
vars)))))))
--8<---------------cut here---------------end--------------->8---
Does that make sense?
Michael.
- pcase-setq (was: pcase-dolist), Michael Heerdegen, 2015/10/12
- Re: pcase-setq, Michael Heerdegen, 2015/10/12
- Re: pcase-setq, Stefan Monnier, 2015/10/12
- Re: pcase-setq, Michael Heerdegen, 2015/10/13
- Re: pcase-setq, Michael Heerdegen, 2015/10/15
- Re: pcase-setq,
Michael Heerdegen <=
- Message not available
- Message not available
- Re: pcase-setq, Stefan Monnier, 2015/10/15
Re: pcase-setq (was: pcase-dolist), Nicolas Petton, 2015/10/15
- Semantic of pcase `seq' and `map' patterns (was: pcase-setq), Michael Heerdegen, 2015/10/12
- Re: Semantic of pcase `seq' and `map' patterns, Michael Heerdegen, 2015/10/12
- Re: Semantic of pcase `seq' and `map' patterns, Nicolas Petton, 2015/10/12
- Re: Semantic of pcase `seq' and `map' patterns, Michael Heerdegen, 2015/10/12
- Re: Semantic of pcase `seq' and `map' patterns, Michael Heerdegen, 2015/10/17
- Re: Semantic of pcase `seq' and `map' patterns, Nicolas Petton, 2015/10/17
Re: Semantic of pcase `seq' and `map' patterns (was: pcase-setq), Nicolas Petton, 2015/10/15
Re: pcase-setq, Michael Heerdegen, 2015/10/15