[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pcase.el
From: |
Ted Zlatanov |
Subject: |
Re: pcase.el |
Date: |
Tue, 28 Sep 2010 13:17:22 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
On Mon, 27 Sep 2010 00:06:13 +0200 Stefan Monnier <address@hidden> wrote:
SM> The docstring of `pcase' is meant to be "complete", so you can start
SM> with that and complain about the missing bits.
...
SM> There's a fairly good/extensive example in macroexp.el.
That was helpful, thank you. I played with it a bit:
(loop for form in '("hello string"
("hello list")
30
symbol
(lambda () ("lambda"))
(what about me))
collect `(,form
"pcased is"
,(pcase form
(`(lambda . ,_)
"lambda function")
(`30 :thirty)
((pred stringp) "that was a string")
(`(what . ,what-args)
(format "what with args %s" what-args))
((pred listp) "that was a list")
(t (format "couldn't match \"%s\"" form)))))
I'll keep it in mind.
The docstring should maybe mention the t pattern (to match anything).
It's functionally equivalent to _ but I think the SYMBOL pattern matches
it... So what happens to the SYMBOL value bind?
Thanks
Ted
- Re: Problems with xml-parse-string, (continued)
- Re: Problems with xml-parse-string, Wojciech Meyer, 2010/09/25
- Re: Problems with xml-parse-string, Stefan Monnier, 2010/09/25
- Re: Problems with xml-parse-string, Leo, 2010/09/25
- Re: Problems with xml-parse-string, Leo, 2010/09/25
- Re: Problems with xml-parse-string, Stefan Monnier, 2010/09/26
- Re: Problems with xml-parse-string, Leo, 2010/09/26
- pcase.el (was: Problems with xml-parse-string), Ted Zlatanov, 2010/09/25
- Re: pcase.el, Stefan Monnier, 2010/09/26
- Re: pcase.el, Leo, 2010/09/27
- Re: pcase.el, Stefan Monnier, 2010/09/27
- Re: pcase.el,
Ted Zlatanov <=
- Re: Problems with xml-parse-string, Andrew W. Nosenko, 2010/09/24
- Re: Problems with xml-parse-string, Kevin Rodgers, 2010/09/22
- Re: Problems with xml-parse-string, Chong Yidong, 2010/09/22
- Re: Problems with xml-parse-string, Lars Magne Ingebrigtsen, 2010/09/22
- Re: Problems with xml-parse-string, Chong Yidong, 2010/09/22
- Re: Problems with xml-parse-string, Lars Magne Ingebrigtsen, 2010/09/22
- Re: Problems with xml-parse-string, Wojciech Meyer, 2010/09/22
- Re: Problems with xml-parse-string, Andy Wingo, 2010/09/22
- Re: Problems with xml-parse-string, Chong Yidong, 2010/09/22
- Re: Problems with xml-parse-string, Edward O'Connor, 2010/09/22