[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] display function that shows sharing
From: |
Kon Lovett |
Subject: |
Re: [Chicken-users] display function that shows sharing |
Date: |
Fri, 27 Apr 2007 13:01:53 -0700 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Apr 27, 2007, at 12:37 PM, address@hidden wrote:
Hi all.
Does chicken have a function that shows sharing in s-exps?
SRFI-38 can do this:
(use srfi-38)
(define a '(1 2))
(define b (list a a))
(write-with-shared-structure b)
(#1=(1 2) #1#)
The problem with SRFI-38 is that I don't want too see sharing
between strings!
So, is there a parameter for SRFI-38?
Or is there a more adequate function in Chicken? (like display-circle
in bigloo)
Not that I know of. But take a look at "testbase-support.scm" in the
testbase egg. There is a function 'proper-object?' which does what
you want.
BTW, the SRFI-38 impl is insufficient in other ways - no record or
hash-table support. It should handle all heterogeneous structures.
HTH,
Kon
Greetings
Sven
_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users
Best Wishes,
Kon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iEYEARECAAYFAkYyVrIACgkQJJNoeGe+5O71+wCfWqec8QbpezOezYidCACKnXc2
NXQAnRu/4Bb/hSBY6Yf69MYWaC8ivtHf
=7cFf
-----END PGP SIGNATURE-----