[plt-scheme] Simple scheme idiom?

From: czhu at cs.utah.edu (czhu at cs.utah.edu)
Date: Fri Sep 15 15:20:07 EDT 2006

Seems that something is wrong with you DrScheme. #?# where ? should be an exact
nonnegtive interger, is used to print sharing in data. In this case, there is
no sharing. On my DrScheme, I tried you program, and it works fine (give the
same output as mzscheme).

Chongkai


Quoting Will M Farr <farr at MIT.EDU>:

> Try this:
> 
> (define (z-ify atom-or-list)
>      (if (pair? atom-or-list)
>          `(z ,(map z-ify atom-or-list))
>          `(z ,atom-or-list)))
> 
> (But don't look at the result in DrScheme.  Using mzscheme, I get:
> 
> (z-ify '(a (b c (d)) e ((f)) g))
> ;; (z ((z a) (z ((z b) (z c) (z ((z d))))) (z e) (z ((z ((z f))))) (z  
> g)))
> 
> Using DrScheme, I get:
> 
>  > (z-ify '(a (b c (d)) e ((f)) g))
> (z ((z a) (z ((z b) (z c) (z (#?#)))) (z e) (z ((z (#?#)))) (z g)))
> 
> Looks like DrScheme doesn't like to print some of the result.)
> 
> Will
> 
> On Sep 15, 2006, at 2:17 PM, David Richards wrote:
> 
> > '(a (b c (d)) e ((f)) g)
> 
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 





Posted on the users mailing list.