Add procedures to get a list of subexpressions of an scode combinator.
authorChris Hanson <org/chris-hanson/cph>
Fri, 1 Mar 2002 17:02:46 +0000 (17:02 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 1 Mar 2002 17:02:46 +0000 (17:02 +0000)
v7/src/runtime/runtime.pkg
v7/src/runtime/scomb.scm

index 9287681149b5394116106c272ebccceab071a2a6..5410c4f7ff78dac117d9a57ad90b7e0dbc2a6d09 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.411 2002/03/01 03:18:38 cph Exp $
+$Id: runtime.pkg,v 14.412 2002/03/01 17:02:46 cph Exp $
 
 Copyright (c) 1988-2002 Massachusetts Institute of Technology
 
@@ -2852,15 +2852,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
          combination-operands
          combination-operator
          combination-size
+         combination-subexpressions
          combination?
          conditional-alternative
          conditional-components
          conditional-consequent
          conditional-predicate
+         conditional-subexpressions
          conditional?
          disjunction-alternative
          disjunction-components
          disjunction-predicate
+         disjunction-subexpressions
          disjunction?
          make-combination
          make-conditional
index 8360d22a1dacb92146cffd89b4f35904dac4efd7..b4346803a0bee9ac483fe428d2d25644ef967659 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: scomb.scm,v 14.19 2002/02/03 03:38:56 cph Exp $
+$Id: scomb.scm,v 14.20 2002/03/01 17:02:40 cph Exp $
 
 Copyright (c) 1988-1999, 2001, 2002 Massachusetts Institute of Technology
 
@@ -200,6 +200,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   (receiver (conditional-predicate conditional)
            (conditional-consequent conditional)
            (conditional-alternative conditional)))
+
+(define (conditional-subexpressions expression)
+  (conditional-components expression list))
 \f
 ;;;; Disjunction
 
@@ -223,6 +226,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 (define (disjunction-components disjunction receiver)
   (receiver (disjunction-predicate disjunction)
            (disjunction-alternative disjunction)))
+
+(define (disjunction-subexpressions expression)
+  (disjunction-components expression list))
 \f
 ;;;; Combination
 
@@ -338,6 +344,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
             (&subvector->list combination 1 (&vector-length combination)))))
 
 )
+
+(define (combination-subexpressions expression)
+  (combination-components expression cons))
 \f
 ;;;; Unassigned?