diff --git a/networks.rkt b/networks.rkt index ed0c9f4..20e7454 100644 --- a/networks.rkt +++ b/networks.rkt @@ -62,8 +62,12 @@ [build-full-boolean-state-graph-annotated (-> dynamics? graph?)] [tabulate-state (->* (procedure? domain-mapping/c) (#:headers boolean?) (listof (listof any/c)))] + [tabulate-state* (->* ((non-empty-listof procedure?) domain-mapping/c) (#:headers boolean?) + (listof (listof any/c)))] [tabulate-state/boolean (->* (procedure? (listof variable?)) (#:headers boolean?) (listof (listof any/c)))] + [tabulate-state*/boolean (->* ((non-empty-listof procedure?) (listof variable?)) (#:headers boolean?) + (listof (listof any/c)))] [tabulate-network (->* (network? domain-mapping/c) (#:headers boolean?) (listof (listof any/c)))] [tabulate-boolean-network (->* (network?) (#:headers boolean?) @@ -739,9 +743,7 @@ ;;; the variable names, and then contains a symbol 'fi for each of the ;;; functions, where i is replaced by the number of the function in ;;; the list. -(define/contract (tabulate-state* funcs domains #:headers [headers #t]) - (->* ((non-empty-listof procedure?) domain-mapping/c) (#:headers boolean?) - (listof (listof any/c))) +(define (tabulate-state* funcs domains #:headers [headers #t]) (define tab (for/list ([st (build-all-states domains)]) (append (hash-map st (λ (x y) y) #t) (for/list ([f funcs]) (f st))))) @@ -753,9 +755,7 @@ [else tab])) ;;; Like tabulate-state/boolean, but takes a list of functions. -(define/contract (tabulate-state*/boolean funcs args #:headers [headers #t]) - (->* ((non-empty-listof procedure?) (listof variable?)) (#:headers boolean?) - (listof (listof any/c))) +(define (tabulate-state*/boolean funcs args #:headers [headers #t]) (tabulate-state* funcs (make-boolean-domains args) #:headers headers)) (module+ test