,@vals))))
(spar-elt)
(spar-push spar-arg:close)
- (spar-or (spar-elt spar-push-id)
+ (spar-or (spar-push-elt-if identifier? spar-arg:form)
(spar-push '#f))
(spar-elt
- (spar-push-values
+ (spar-call-with-values list
(spar* (spar-elt
(spar-call-with-values cons
- (spar-elt spar-push-id)
+ (spar-push-elt-if identifier? spar-arg:form)
(spar-or (spar-push-elt spar-arg:form)
(spar-push-value unassigned-expression)))
spar-match-null))
(syntax-defn-item id (keyword-item-expr item))
(seq-item '()))))
(spar-elt)
- (spar-elt spar-push-id)
+ (spar-push-elt-if identifier? spar-arg:form)
(spar-push spar-arg:senv)
(spar-elt
spar-push-classified
(lambda (bvl body senv)
(assemble-lambda-item scode-lambda-name:unnamed bvl body senv))
(spar-elt)
- (spar-elt
- (spar-match mit-lambda-list? spar-arg:form)
- (spar-push spar-arg:form))
+ (spar-push-elt-if mit-lambda-list? spar-arg:form)
spar-push-body))))
(define :named-lambda
(assemble-lambda-item (identifier->symbol name) bvl body senv))
(spar-elt)
(spar-elt
- (spar-elt spar-push-id)
- (spar-match mit-lambda-list? spar-arg:form)
- (spar-push spar-arg:form))
+ (spar-push-elt-if identifier? spar-arg:form)
+ (spar-push-if mit-lambda-list? spar-arg:form))
spar-push-body))))
(define (assemble-lambda-item name bvl body senv)
(seq-item (body frame-senv))))
(spar-elt)
(spar-elt
- (spar-push-values
+ (spar-call-with-values list
(spar*
(spar-call-with-values cons
- (spar-elt (spar-elt spar-push-id)
+ (spar-elt (spar-push-elt-if identifier? spar-arg:form)
(spar-elt spar-push-classified)
spar-match-null))))
spar-match-null)
(seq-item (body frame-senv))))
(spar-elt)
(spar-elt
- (spar-push-values
+ (spar-call-with-values list
(spar*
(spar-call-with-values cons
- (spar-elt (spar-elt spar-push-id)
+ (spar-elt (spar-push-elt-if identifier? spar-arg:form)
(spar-elt spar-push-open-classified)
spar-match-null))))
spar-match-null)
(delay
(spar-call-with-values access-item
(spar-elt)
- (spar-elt spar-push-id)
+ (spar-push-elt-if identifier? spar-arg:form)
(spar-elt spar-push-classified)
spar-match-null))))
(spar-elt)
(spar-push spar-arg:senv)
(spar-push spar-arg:hist)
- (spar-push-values
- (spar*
- (spar-elt
- (spar-match (lambda (form)
- (and (pair? form)
- (identifier? (car form))
- (list? (cdr form))))
- spar-arg:form)
- (spar-push spar-arg:form))))
+ (spar-call-with-values list
+ (spar*
+ (spar-push-elt-if (lambda (form)
+ (and (pair? form)
+ (identifier? (car form))
+ (list? (cdr form))))
+ spar-arg:form)))
spar-match-null))))
(define (classify-id id senv hist)
failure)
(failure)))))
+(define (spar-match-elt predicate . args)
+ (spar-elt (apply spar-match predicate args)))
+
(define (spar-push-elt . args)
(spar-elt (apply spar-push args)))
-(define (spar-push-elt-if . args)
- (spar-elt (apply spar-push-if args)))
+(define (spar-push-elt-if predicate . args)
+ (spar-elt (apply spar-push-if predicate args)))
(define-deferred spar-match-null
(spar-match null? spar-arg:form))
spar-arg:form
spar-arg:senv
spar-arg:hist))
-
-(define-deferred spar-push-id
- (spar-seq
- (spar-match identifier? spar-arg:form)
- (spar-push spar-arg:form)
- spar-discard-form))
\f
;;;; Value combinators
-(define (spar-push-values . spars)
- (%with-output (lambda (output output*)
- (%output-push output (%output-all output*)))
- spars))
-
(define (spar-encapsulate-values procedure . spars)
(%encapsulate procedure spars))