diff --git a/networks.rkt b/networks.rkt index 4116195..e3508cc 100644 --- a/networks.rkt +++ b/networks.rkt @@ -77,7 +77,7 @@ [random-network (domain-mapping/c . -> . network?)] [random-boolean-network ((listof variable?) . -> . network?)] [random-boolean-network/vars (number? . -> . network?)] - [apply-tbf/state (-> tbf? state? (or/c 0 1))]) + [apply-tbf-to-state (-> tbf? state? (or/c 0 1))]) ;; Predicates (contract-out [variable? (-> any/c boolean?)] [state? (-> any/c boolean?)] @@ -933,10 +933,10 @@ ;;; The values of the variables of the state are ordered by hash-map ;;; and fed to the TBF in order. The number of the inputs of the TBF ;;; must match the number of variables in the state. -(define (apply-tbf/state tbf st) +(define (apply-tbf-to-state tbf st) (apply-tbf tbf (list->vector (hash-map st (λ (_ val) val))))) (module+ test (define st (make-state '((x1 . 0) (x2 . 1)))) (define f (tbf #(1 1) 1)) - (check-equal? (apply-tbf/state f st) 0)) + (check-equal? (apply-tbf-to-state f st) 0))