emacs-devel
[Top][All Lists]
Advanced

[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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]