[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another pcase-lambda
From: |
Michael Heerdegen |
Subject: |
Re: Another pcase-lambda |
Date: |
Thu, 21 Sep 2017 13:40:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) |
Mark Oteiza <address@hidden> writes:
> (defmacro case-lambda (&rest spec)
> "Return an arbitrary arity function."
> (declare (indent 0) (debug (&rest (pcase-QPAT body))))
> (let ((args (make-symbol "args")))
> `(lambda (&rest ,args)
> (pcase-exhaustive ,args ,@spec))))
I think I would prefer to spell it out and use the expanded form
instead. It's nice, but I'm not convinced it would be worth adding.
OTOH, as an occasional user of `pcase-lambda' I know that it's a bit
cumbersome to use. But `case-lambda' defers all calculation into the
argument list - I'm not sure if this is so useful all the time.
BTW, what I sometimes do miss is `pcase-defun'.
Michael.
- Another pcase-lambda, Mark Oteiza, 2017/09/18
- Re: Another pcase-lambda,
Michael Heerdegen <=
- Re: Another pcase-lambda, Mark Oteiza, 2017/09/22
- Re: Another pcase-lambda, Clément Pit-Claudel, 2017/09/22
- Re: Another pcase-lambda, Michael Heerdegen, 2017/09/23
- Re: Another pcase-lambda, Stefan Monnier, 2017/09/23
- Re: Another pcase-lambda, Michael Heerdegen, 2017/09/23
- Re: Another pcase-lambda, Ted Zlatanov, 2017/09/28