use crate::array::vec::VecKind;
use crate::lax::open_hypergraph::*;
use crate::operations::Operations;
use crate::strict;
pub trait Functor<O1, A1, O2, A2> {
fn map_object(&self, o: &O1) -> impl ExactSizeIterator<Item = O2>;
fn map_operation(&self, a: &A1, source: &[O1], target: &[O1]) -> OpenHypergraph<O2, A2>;
fn map_arrow(&self, f: &OpenHypergraph<O1, A1>) -> OpenHypergraph<O2, A2> {
let fx = f
.hypergraph
.edges
.iter()
.map(|op| self.map_operation(op, todo!(), todo!()));
let fw: Vec<_> = f.hypergraph.nodes.iter().map(|o| self.map_object(o));
spider_map_arrow(f, fw, fx)
}
}
pub(crate) fn spider_map_arrow<O1, A1, O2, A2>(
f: &OpenHypergraph<O1, A1>,
fw: impl Iterator<Item = impl Iterator<Item = O2>>,
fx: impl Iterator<Item = OpenHypergraph<O2, A2>>,
) -> OpenHypergraph<O2, A2> {
todo!()
}