|
|
@ -433,26 +433,23 @@ |
|
|
|
(get-range-start state-value) |
|
|
|
(get-range-start state-value) |
|
|
|
(get-range-end state-value))) |
|
|
|
(get-range-end state-value))) |
|
|
|
|
|
|
|
|
|
|
|
(define (apply-map-to-state-entry seed-map) |
|
|
|
|
|
|
|
(lambda (state-entry) |
|
|
|
|
|
|
|
(if |
|
|
|
|
|
|
|
(is-state-value-current state-entry) |
|
|
|
|
|
|
|
(list state-entry) |
|
|
|
|
|
|
|
(apply-map-to-previous-state-value seed-map (get-state-value state-entry))))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define (apply-map-to-state seed-map) |
|
|
|
|
|
|
|
(compose (list |
|
|
|
|
|
|
|
flat |
|
|
|
|
|
|
|
(map (apply-map-to-state-entry seed-map))))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define (seed-maps-processor seed-maps) |
|
|
|
(define (seed-maps-processor seed-maps) |
|
|
|
(compose (list |
|
|
|
(compose (list |
|
|
|
;; for state |
|
|
|
;; for state |
|
|
|
#!(tee-with-comment "state after applying mapset")!# |
|
|
|
#!(tee-with-comment "state after applying mapset")!# |
|
|
|
((compose (list |
|
|
|
((compose (list |
|
|
|
;; for list of maps (within a single map set); should return state-transforming lambda |
|
|
|
;; for list of maps (within a single map set); returns state-transforming lambda |
|
|
|
compose |
|
|
|
compose |
|
|
|
(map apply-map-to-state))) |
|
|
|
(map (lambda (seed-map) |
|
|
|
|
|
|
|
;; for seed map within the list: returns state-transforming lambda |
|
|
|
|
|
|
|
(compose (list |
|
|
|
|
|
|
|
flat |
|
|
|
|
|
|
|
(map (lambda (state-entry) |
|
|
|
|
|
|
|
;; for seed map _and_ single range from state, returns list of new ranges |
|
|
|
|
|
|
|
(if |
|
|
|
|
|
|
|
(is-state-value-current state-entry) |
|
|
|
|
|
|
|
(list state-entry) |
|
|
|
|
|
|
|
(apply-map-to-previous-state-value seed-map (get-state-value state-entry))))))))))) |
|
|
|
seed-maps) |
|
|
|
seed-maps) |
|
|
|
swap-state))) |
|
|
|
swap-state))) |
|
|
|
|
|
|
|
|
|
|
|