help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Actions using symbols


From: Manuel Giraud
Subject: Re: Actions using symbols
Date: Mon, 02 Sep 2024 15:38:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Heime <heimeborgia@protonmail.com> writes:

> I customarily make symbols that I can check on as conditionals
>
> (defun myfunc (actn)
>   (when (eq actn 'something) dothis)
>
> Would things go wrong should I start using function names as arguments

No.

> For instance, myfunc would use a mapcar implementation when ACTN is
> 'mapcar and an apply-partially implementation when ACTN is 'apply-partially
>
> (defun myfunc (actn)
>   (when (eq actn 'mapcar) dothis)
>   (when (eq actn 'apply-partially) dothat)

This is correct code.
-- 
Manuel Giraud



reply via email to

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