William James
1/15/2016 11:23:00 AM
WJ wrote:
> Tim Bradshaw wrote:
>
> > (defun stringify (&rest strings/objects)
> > (apply #'concatenate 'string
> > (mapcar #'(lambda (x)
> > (typecase x
> > (string x)
> > (t (princ-to-string x))))
> > strings/objects)))
> >
> > * (stringify "this is " 'stringify " thing with " 4 " arguments")
> > "this is stringify thing with 4 arguments"
> >
> > ? It's not quite as simple as perl, but it's OK I think.
>
> Gauche Scheme:
>
> (define (stringify . items)
> (string-join (map x->string items) ""))
>
> (stringify "this is " 'stringify " thing with " 4 " arguments")
> ===>
> "this is stringify thing with 4 arguments"
MatzLisp (Ruby):
["this is ", :stringify, " thing with ", 4, " arguments"].join
==>"this is stringify thing with 4 arguments"
--
Use this [sword] for me, if I rule well; if not, against me. --- Trajan
"If a government uses the instruments of power in its hands for the purpose of
leading a people to ruin, then rebellion is not only the right but also the
duty of every individual citizen."