diff --git a/networks.rkt b/networks.rkt index 2c796d7..d8b0938 100644 --- a/networks.rkt +++ b/networks.rkt @@ -16,7 +16,7 @@ make-01-domains make-01-network update UpdateFunctionForm (struct-out network-form) NetworkForm - update-function-form->update-function + update-function-form->update-function/any ) (define-type (State a) (VariableMapping a)) @@ -125,14 +125,14 @@ #:transparent #:type-name NetworkForm) - (: update-function-form->update-function (-> UpdateFunctionForm (UpdateFunction Any))) - (define (update-function-form->update-function form) + (: update-function-form->update-function/any (-> UpdateFunctionForm (UpdateFunction Any))) + (define (update-function-form->update-function/any form) (λ (s) (eval1-with s form))) (module+ test - (test-case "update-function-form->update-function" + (test-case "update-function-form->update-function/any" (define s (hash 'x #t 'y #f)) - (define f (update-function-form->update-function '(and x y))) + (define f (update-function-form->update-function/any '(and x y))) (check-equal? (f s) #f))) ) @@ -303,7 +303,7 @@ (define (network-form->network nf) (network (for/hash ([(x form) (in-hash (network-form-forms nf))]) - (values x (update-function-form->update-function form))) + (values x (update-function-form->update-function/any form))) (network-form-domains nf))) (module+ test diff --git a/scribblings/networks.scrbl b/scribblings/networks.scrbl index 14ab119..9de4846 100644 --- a/scribblings/networks.scrbl +++ b/scribblings/networks.scrbl @@ -232,13 +232,13 @@ The type of instances of @racket[network-form]. (hash 'a '(#f #t) 'b '(#f #t))) ]} -@defproc[(update-function-form->update-function [func UpdateFunctionForm]) - (UpdateFunction Any)]{ +@defproc[(update-function-form->update-function/any [func UpdateFunctionForm]) + (UpdateFunction Any)]{ Builds an update function from an update function form. @ex[ -(define and-from-form (update-function-form->update-function '(and x y))) +(define and-from-form (update-function-form->update-function/any '(and x y))) (and-from-form (hash 'x #f 'y #f)) (and-from-form (hash 'x #f 'y #t)) (and-from-form (hash 'x #t 'y #f))