From: uzibalqa <uzibalqa@proton.me>
To: uzibalqa via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Passing optional arguments for use with internal functions
Date: Thu, 27 Jul 2023 23:45:39 +0000 [thread overview]
Message-ID: <0Ezo2Srah2_DE-D1XG3MBYVEmAvnfHLu8cKpS3oJa4Hn5ADeV7sBbHFTtIzRAFv461O5XlpcjkyImCJHO7DKvaM492vQW7cz9wXL_VaDAdQ=@proton.me> (raw)
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))
next reply other threads:[~2023-07-27 23:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 23:45 uzibalqa [this message]
2023-07-28 10:51 ` Passing optional arguments for use with internal functions 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='0Ezo2Srah2_DE-D1XG3MBYVEmAvnfHLu8cKpS3oJa4Hn5ADeV7sBbHFTtIzRAFv461O5XlpcjkyImCJHO7DKvaM492vQW7cz9wXL_VaDAdQ=@proton.me' \
--to=uzibalqa@proton.me \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).