all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Passing optional arguments for use with internal functions
@ 2023-07-27 23:45 uzibalqa
  2023-07-28 10:51 ` Emanuel Berg
  0 siblings, 1 reply; 16+ messages in thread
From: uzibalqa @ 2023-07-27 23:45 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor

I have this function and want the ability to use the optional argument in
'lexif'.  I just added optional actm in reshuf so it is passed to 'lexif'
if the option is present.

Is this the way to allow optional arguments for 'lexif', or would I have 
additional tests to see whether 'actm' is present in 'reshuf' so that
I either call (lexif mutant) or (lexif mutant actm).

(defun reshuf (word n &optional actm)

  (let ( (wlis '()) )

    (add-to-list 'wlis word)
    (dotimes (i n)
      (let ((mutant (shuffle word)))

        (when (lexif mutant actm)
          (add-to-list 'wlis mutant) )))

    wlis))





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-08-03 15:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27 23:45 Passing optional arguments for use with internal functions uzibalqa
2023-07-28 10:51 ` Emanuel Berg
2023-07-28 16:42   ` Heime
2023-07-28 17:11     ` Emanuel Berg
2023-07-30 16:09       ` uzibalqa
2023-07-31 12:27         ` Emanuel Berg
2023-08-02 18:01           ` uzibalqa
2023-08-02 18:20             ` Emanuel Berg
2023-08-02 19:24               ` uzibalqa
2023-08-02 19:53                 ` uzibalqa
2023-08-02 23:24                   ` Emanuel Berg
2023-08-03 15:25                   ` Emanuel Berg
2023-08-03 15:35                   ` Emanuel Berg
2023-08-03 15:46                   ` Emanuel Berg
2023-07-28 20:02   ` [External] : " Drew Adams
2023-07-28 20:42     ` uzibalqa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.