我有一个依赖图,其中一个节点需要前一个节点的两个副本才能满足。我想使用拓扑排序来获得评估顺序,但问题是拓扑排序忽略了平行/多边,而只是将其视为一种依赖关系。我的建模是否错误,或者我是否需要一个适用于多重图的特定拓扑排序?
Is there something similar to the Applicative
type class, but where there are two functors for each side of the application which are different?
i.e. (<*>) :: (Functor f, Functor g) => f (a -> b) -> g a -> f b