rs: Add ReactionSystem.

This commit is contained in:
Sergiu Ivanov 2020-03-01 19:19:58 +01:00
parent f62592574b
commit 0cb57196c5
1 changed files with 5 additions and 1 deletions

6
rs.rkt
View File

@ -8,7 +8,7 @@
;; Structures
reaction
;; Type names
Species
Species ReactionSystem
;; Functions
enabled?)
@ -31,3 +31,7 @@
(define/match (enabled? r s)
[((reaction r i p) s)
(and (subset? r s) (set-empty? (set-intersect i s)))])
;;; A reaction system is a dictionary mapping reaction names to
;;; reactions.
(define-type ReactionSystem (HashTable Symbol reaction))