cleanup whitespace

This commit is contained in:
Alex Shinn 2020-05-25 18:52:33 +09:00
parent 7bbbb1fb2c
commit 6b449150fc
2 changed files with 104 additions and 98 deletions

View file

@ -21,7 +21,7 @@
;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;; SOFTWARE.
(define-record-type <computation-environment-variable>
(define-record-type Computation-Environment-Variable
(make-environment-variable name default immutable? id)
environment-variable?
(name environment-variable-name)
@ -101,7 +101,8 @@
(define (computation-environment-ref env var)
(if (predefined? var)
(unbox (environment-cell env var))
(mapping-ref (environment-local env)
(mapping-ref
(environment-local env)
var
(lambda ()
(hash-table-ref/default (environment-global env)
@ -205,7 +206,8 @@
(syntax-rules ()
((_ () ((id var tmp) ...) expr ... computation)
(let ((tmp var) ...)
(computation-bind (computation-ask)
(computation-bind
(computation-ask)
(lambda (env)
(let ((id (computation-environment-ref env tmp)) ...)
expr ...
@ -242,7 +244,8 @@
(syntax-rules ()
((_ ((var u val v) ...))
(let ((u var) ... (v val) ...)
(computation-bind (computation-ask)
(computation-bind
(computation-ask)
(lambda (env)
(computation-environment-update! env u v) ...
(computation-pure (if #f #f))))))
@ -268,10 +271,13 @@
proc*))
(define (computation-sequence fmt*)
(fold-right (lambda (fmt res)
(computation-bind res
(fold-right
(lambda (fmt res)
(computation-bind
res
(lambda (vals)
(computation-bind fmt
(computation-bind
fmt
(lambda (val)
(computation-pure (cons val vals)))))))
(computation-pure '()) fmt*))