diff --git a/networks.rkt b/networks.rkt index cda1dc7..56eb9f1 100644 --- a/networks.rkt +++ b/networks.rkt @@ -76,7 +76,7 @@ (define-syntax-rule (st mappings) (make-state mappings)) ;;; A version of make-hash restricted to creating networks. -(define (make-network-from-functions funcs) (make-hash funcs)) +(define (make-network-from-functions funcs) (make-immutable-hash funcs)) ;;; ================================= @@ -98,13 +98,13 @@ ;;; Build a network from a network form. (define (network-form->network bnf) - (make-hash + (make-immutable-hash (hash-map bnf (λ (x form) (cons x (update-function-form->update-function form)))))) ;;; Build a network from a list of pairs of forms of update functions. (define (make-network-from-forms forms) - (network-form->network (make-hash forms))) + (network-form->network (make-immutable-hash forms))) ;;; A shortcut for make-network-from-forms. (define-syntax-rule (nn forms) (make-network-from-forms forms))