<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16939" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>I think the following is ment:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>(local ((define number+
+))<BR>
(local<BR> ((define
+<BR>
(lambda
x<BR>
(cond<BR>
((null? x)
0)<BR>
((string? (car x)) (apply string-append
x))<BR>
(else (apply number+ x))))))<BR>
<BR> (define str
"sdfdsf")<BR> (display (+ "something"
str))<BR>
(newline)<BR> (display (+ 1 2
3))))</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Jos</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=laurent.orseau@gmail.com
href="mailto:laurent.orseau@gmail.com">Laurent</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=matthias@ccs.neu.edu
href="mailto:matthias@ccs.neu.edu">Matthias Felleisen</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=charliesmith001@gmail.com
href="mailto:charliesmith001@gmail.com">Charlie Smith</A> ; <A
title=plt-scheme@list.cs.brown.edu
href="mailto:plt-scheme@list.cs.brown.edu">plt-scheme</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, November 27, 2009 8:48
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [plt-scheme] possibly silly
question</DIV>
<DIV><BR></DIV><BR><BR>
<DIV class=gmail_quote>On Thu, Nov 26, 2009 at 18:23, Matthias Felleisen <SPAN
dir=ltr><<A
href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>(define
str "sdfdsf")<BR>(display (string-append "something" str))<BR><BR>;; if you
really like the + symbol, define + to do some more locally<BR><BR>#lang
scheme<BR><BR>(local ((define + (let ((+ +)) (lambda x<BR>
(cond<BR>
[(null? x) 0]<BR>
[(string?
(car x)) (apply string-append x)]<BR>
[else (apply + x)])))))<BR><BR> (define str
"sdfdsf")<BR> (display (string-append "something" str)))<BR></BLOCKQUOTE>
<DIV><BR><BR>On the last line, Matthias probably meant:<BR> (display (+
"something" str)))<BR><BR>which shows that + ca be redefined locally to act
like string-append (and still keep its usual meaning on
numbers).<BR><BR>Laurent<BR><BR> </DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV></DIV>
<DIV class=h5><BR><BR>On Nov 26, 2009, at 7:43 AM, Charlie Smith
wrote:<BR><BR>> hi<BR>><BR>> i'd like to know if there is some way
of adding strings (sorry, i don't what the correct term for this is, maybe
variable interpolation?) like for example in ruby it would be
like<BR>><BR>> str = "sdfdsf"<BR>> puts "something" + str<BR>>
output: "somethingsdsdf"<BR>><BR>> the function string-append isn't
what I want, because i would be adding strings somewhat arbitarily in
between other strings<BR>><BR>><BR>><BR>><BR></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>> _________________________________________________<BR>>
For list-related administrative tasks:<BR>> <A
href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme"
target=_blank>http://list.cs.brown.edu/mailman/listinfo/plt-scheme</A><BR><BR>_________________________________________________<BR> For
list-related administrative tasks:<BR> <A
href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme"
target=_blank>http://list.cs.brown.edu/mailman/listinfo/plt-scheme</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR>
<P>
<HR>
<P></P>_________________________________________________<BR> For
list-related administrative tasks:<BR>
http://list.cs.brown.edu/mailman/listinfo/plt-scheme<BR></BLOCKQUOTE></BODY></HTML>