From: Doug Evans <dje@transmeta.com>
To: Jim Blandy <jimb@redhat.com>
Cc: cgen@sources.redhat.com
Subject: PATCH: Handle symbols in messages
Date: Fri, 21 Jan 2005 00:26:00 -0000 [thread overview]
Message-ID: <16880.19488.18881.229285@casey.transmeta.com> (raw)
In-Reply-To: <vt2fz0vvhjm.fsf@zenia.home>
fwiw, while string-concat might not clearly specify the operation
(though I don't have a problem with it), `concat' seems too generic
(or at least not string-specific enough in the way that the rest of
the string functions are so named).
string-map is to map,
as string-list is to list,
as string-<mumble> is to concat.
concat mightn't make sense outside of strings (and thus why have the
string- prefix ...), but why preclude symbol-concat? (etc.)
How about string-concat?
> diff -c -p -r1.82 utils.scm
> *** cgen/utils.scm 16 Dec 2004 21:52:37 -0000 1.82
> --- cgen/utils.scm 20 Jan 2005 22:52:04 -0000
> ***************
> *** 85,90 ****
> --- 85,96 ----
> (write (spaces n) port))
> )
>
> + ; Concatenate all the arguments and make a string. Symbols are
> + ; converted to strings.
> + (define (concat . sequences)
> + (define (sequence->string o) (if (symbol? o) (symbol->string o) o))
> + (apply string-append (map sequence->string sequences)))
> +
> ; Often used idiom.
>
> (define (string-map fn . args) (apply string-append (apply map (cons fn args))))
next prev parent reply other threads:[~2005-01-21 0:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 22:59 Jim Blandy
2005-01-21 0:26 ` Doug Evans [this message]
2005-01-22 2:44 ` Jim Blandy
2005-01-27 20:38 ` Jim Blandy
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16880.19488.18881.229285@casey.transmeta.com \
--to=dje@transmeta.com \
--cc=cgen@sources.redhat.com \
--cc=jimb@redhat.com \
/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).