🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cu.slug
Article #593

DW::FORMAT-GRAPH-FROM-ROOT question

#593
From: David Gadbois
Date: Mon, 27 Nov 1995 00:00
23 lines
1183 bytes
    Date: Mon, 27 Nov 1995 13:33-0600
    From: <israel_m101@orion.crc.monroecc.edu>

    I am trying to use DW:Format-Graph-From-Node in Generia 8.1.1 to
    create a tree-diagram of an sexpression such as '(* 3 (/ 3 4) 5) and
    want this tree displayed. (To turn an sexp into a tree diagram.):

You need to have your node printer and inferior producer understand the
datastructure:

(scl:format-graph-from-root
  '(* 3 (/ 3 4) 5)
  #'(lambda (object stream)
      (princ (if (consp object)
		 (car object)
		 object)
	     stream))
  #'(lambda (object)
      (if (consp object)
	  (cdr object)
	  nil)))

--David Gadbois
Technical Details
Message-ID: <817516557.21986@news.Colorado.EDU>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10077e,9de66516023090bc
X-Google-Attributes: gid10077e,public
From: David Gadbois <gadbois@cyc.com>
Subject: DW::FORMAT-GRAPH-FROM-ROOT question
Date: 1995/11/27
Message-ID: <817516557.21986@news.Colorado.EDU>
X-Deja-AN: 120230121
distribution: cu
sender: daemon@lace.colorado.edu
x-note1: message-id generated by recnews
x-note2: mail msgid was   <19951127224508.5.GADBOIS@ZORAK-ZORAN.MCC.COM>
organization: University of Colorado at Boulder
newsgroups: cu.slug