Fw: [plt-scheme] Problem of type

From: Jos Koot (jos.koot at telefonica.net)
Date: Sun Nov 25 11:43:52 EST 2007



 (define (convert x)
 (let ((op (open-output-string)))
  (write x op)
  (string->list (get-output-string op))))
 Jos

> ----- Original Message ----- 
> From: "Laurent" <Ouaibou at gmail.com>
> To: <plt-scheme at list.cs.brown.edu>
> Sent: Sunday, November 25, 2007 5:25 PM
> Subject: [plt-scheme] Problem of type
> 
> 
>> Hello,
>> 
>> I have a list which contains scheme expressions :
>> 
>> code : '((define (...)) (+ 3 4) ...)
>> 
>> And i want to insert each elements from code in a text%
>> 
>> Thus, i do a loop :
>> 
>> (for-each (labmda (e)
>>                  (send text insert e))
>>          code)
>> 
>> My problem is that e isn't a string. Not a symbol and not recognize
>> like a list.
>> I can't do a (symbol->string e) or a (list->string e).
>> 
>> How insert each elements in my text% ?
>> 
>> Thanks,
>> Laurent
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>


Posted on the users mailing list.