flattenForks function
Implementation
List<List> flattenForks(List t) {
final NodeId nodeId = NodeId.fromValue(t[0]);
switch (nodeId) {
case NodeId.empty:
return [];
case NodeId.fork:
final res = flattenForks(t[1] as List);
res.addAll(flattenForks(t[2] as List));
return res;
default:
return [t];
}
}