---
source: hydroflow/tests/surface_singleton.rs
expression: "df.meta_graph().unwrap().to_mermaid(& Default :: default())"
---
%%{init:{'theme':'base','themeVariables':{'clusterBkg':'#ddd','clusterBorder':'#888'}}}%%
flowchart TD
classDef pullClass fill:#8af,stroke:#000,text-align:left,white-space:pre
classDef pushClass fill:#ff8,stroke:#000,text-align:left,white-space:pre
classDef otherClass fill:#fdc,stroke:#000,text-align:left,white-space:pre
linkStyle default stroke:#aaa
1v1[\"(1v1) source_iter(1..=10)
"/]:::pullClass
2v1[\"(2v1) source_iter(3..=5)
"/]:::pullClass
3v1[\"(3v1) fold(|| 0, |a, b| *a = std::cmp::max(*a, b))
"/]:::pullClass
4v1[\"(4v1) filter(|&value| { value <= max_of_stream2 })
"/]:::pullClass
5v1[\"(5v1) map(|x| (context.current_tick(), x))
"/]:::pullClass
6v1[/"(6v1) for_each(|x| filter_send.send(x).unwrap())
"\]:::pushClass
7v1[\"(7v1) map(|x| (context.current_tick(), x))
"/]:::pullClass
8v1[/"(8v1) for_each(|x| max_send.send(x).unwrap())
"\]:::pushClass
9v1["(9v1) handoff
"]:::otherClass
2v1-->9v1
5v1-->6v1
4v1-->5v1
1v1-->4v1
7v1-->8v1
3v1-->7v1
9v1--x3v1; linkStyle 6 stroke:red
3v1--x4v1; linkStyle 7 stroke:red
subgraph sg_1v1 ["sg_1v1 stratum 0"]
2v1
subgraph sg_1v1_var_stream2 ["var stream2"]
2v1
end
end
subgraph sg_2v1 ["sg_2v1 stratum 2"]
1v1
4v1
5v1
6v1
subgraph sg_2v1_var_filtered_stream1 ["var filtered_stream1"]
4v1
5v1
6v1
end
subgraph sg_2v1_var_stream1 ["var stream1"]
1v1
end
end
subgraph sg_3v1 ["sg_3v1 stratum 1"]
3v1
7v1
8v1
subgraph sg_3v1_var_max_of_stream2 ["var max_of_stream2"]
3v1
end
end