I tried generalising my code from Boolean networks to any kinds of
networks, but got tired of having to fight the type system (for now at
least). The last drop was the fact that the graph library does not
seem to have a typed version. So I decided to go with contracts
instead.