network: Create immutable hashes by default.
This commit is contained in:
parent
ac8e63c5f4
commit
c2c87d0a7d
1 changed files with 3 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue