fanout :: GraphT s a b -> GraphT s c b
fanout x = do
    st <- get
    let (b, st') = runGraph x st
    put st'
    return b

--fanin :: GraphT s [a] b -> GraphT s a b
--fanin = modify . runGraph

-- | Given a `Graph`, extracts the `JStat` that this Graph would have
--   rendered.  Useful for compositional tools.
--   TODO there is probably a better way to do this.
fanout :: GraphT s a b -> GraphT s c b
fanout x = do
    st <- get
    let (b, st') = runGraph x st
    put st'
    return b

--fanin :: GraphT s [a] b -> GraphT s a b
--fanin = modify . runGraph

-- | Given a `Graph`, extracts the `JStat` that this Graph would have
--   rendered.  Useful for compositional tools.
--   TODO there is probably a better way to do this.
fanout x = do
    st <- get
    let (b, st') = runGraph x st
    put st'
    return b

--fanin :: GraphT s [a] b -> GraphT s a b
--fanin = modify . runGraph

-- | Given a `Graph`, extracts the `JStat` that this Graph would have
--   rendered.  Useful for compositional tools.
--   TODO there is probably a better way to do this.