`current-action-transformer`

This commit is contained in:
Tony Garnock-Jones 2016-11-29 10:19:52 +13:00
parent 05c57ec05d
commit f638923c6f
1 changed files with 8 additions and 2 deletions

View File

@ -59,6 +59,7 @@
;; ;;
current-action-transformer
schedule-action! schedule-action!
schedule-actions! schedule-actions!
actor-action actor-action
@ -250,6 +251,9 @@
;; Parameterof Boolean ;; Parameterof Boolean
(define in-script? (make-parameter #f)) (define in-script? (make-parameter #f))
;; Parameterof (Action -> Action)
(define current-action-transformer (make-parameter values))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Syntax; main entry points ;; Syntax; main entry points
@ -930,7 +934,8 @@
(when (patch-non-empty? ac) (when (patch-non-empty? ac)
(current-pending-patch (compose-patch ac (current-pending-patch)))) (current-pending-patch (compose-patch ac (current-pending-patch))))
(begin (flush-pending-patch!) (begin (flush-pending-patch!)
(current-pending-actions (list (current-pending-actions) ac))))) (current-pending-actions (list (current-pending-actions)
((current-action-transformer) ac))))))
(define (schedule-actions! . acs) (define (schedule-actions! . acs)
(for [(ac (core:clean-actions acs))] (schedule-action! ac))) (for [(ac (core:clean-actions acs))] (schedule-action! ac)))
@ -939,7 +944,8 @@
(define p (current-pending-patch)) (define p (current-pending-patch))
(when (patch-non-empty? p) (when (patch-non-empty? p)
(current-pending-patch patch-empty) (current-pending-patch patch-empty)
(current-pending-actions (list (current-pending-actions) p)))) (current-pending-actions (list (current-pending-actions)
((current-action-transformer) p)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Endpoint Creation ;; Endpoint Creation