[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another pcase-lambda
From: |
Mark Oteiza |
Subject: |
Re: Another pcase-lambda |
Date: |
Fri, 22 Sep 2017 17:37:07 -0400 |
User-agent: |
NeoMutt/20170912-13-728bb5 |
On 21/09/17 at 11:40am, Michael Heerdegen wrote:
> 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.
Thanks. I just always expect pcase-lambda to behave more like pcase,
hence I wrote this.
> BTW, what I sometimes do miss is `pcase-defun'.
Was that a thing that existed?
- Another pcase-lambda, Mark Oteiza, 2017/09/18
- Re: Another pcase-lambda, Michael Heerdegen, 2017/09/21
- Re: Another pcase-lambda,
Mark Oteiza <=
- 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