///|
// Only tasks in a directed cycle are members; Kahn's blocked descendants are
// not. Both passes are iterative, using the existing output-pin task graph.
fn graph_cyclic_members(
  next : Array[Array[Int32]],
  active : Array[Bool],
) -> Array[Bool] {
  let seen = Array::make(next.length(), false)
  let postorder : Array[Int32] = []
  for root in 0.. [])
  for node in 0.. 0; {
    let root = postorder[cursor - 1]
    if assigned[root] {
      continue cursor - 1
    }
    let stack = [root]
    let component = []
    assigned[root] = true
    while !stack.is_empty() {
      let node = stack.pop().unwrap()
      component.push(node)
      for parent in reverse[node] {
        if !assigned[parent] {
          assigned[parent] = true
          stack.push(parent)
        }
      }
    }
    if component.length() > 1 || next[root].contains(root) {
      for node in component {
        members[node] = true
      }
    }
    continue cursor - 1
  }
  members
}