@@ -71,7 +71,7 @@ pub fn recur(is_leaf: SigNode, children: SigNode, combine: SigNode, env: &mut Ui
71
71
scalar_child,
72
72
} ) = stack. pop ( )
73
73
{
74
- println ! ( "value: {value:?}, parent: {parent:?}, child_nodes: {child_nodes:?}" ) ;
74
+ // println!("value: {value:?}, parent: {parent:?}, child_nodes: {child_nodes:?}");
75
75
if let Some ( child_nodes) = child_nodes {
76
76
env. push_all (
77
77
( consts. iter ( ) )
@@ -80,6 +80,16 @@ pub fn recur(is_leaf: SigNode, children: SigNode, combine: SigNode, env: &mut Ui
80
80
) ;
81
81
let children_value = if scalar_child && child_nodes. len ( ) == 1 {
82
82
child_nodes. into_iter ( ) . next ( ) . unwrap ( )
83
+ } else if child_nodes
84
+ . iter ( )
85
+ . all ( |val| matches ! ( val, Value :: Box ( _) ) && val. rank ( ) <= 1 )
86
+ {
87
+ let mut child_nodes = child_nodes. into_iter ( ) ;
88
+ let mut val = child_nodes. next ( ) . unwrap ( ) ;
89
+ for child in child_nodes {
90
+ val = val. join ( child, false , env) ?;
91
+ }
92
+ val
83
93
} else {
84
94
Value :: from_row_values ( child_nodes, env) ?
85
95
} ;
@@ -135,7 +145,7 @@ pub fn recur(is_leaf: SigNode, children: SigNode, combine: SigNode, env: &mut Ui
135
145
env. exec ( children. clone ( ) ) ?;
136
146
let children = env. pop ( "child nodes" ) ?;
137
147
let index = stack. len ( ) ;
138
- println ! ( "{value:?} has children {children:?}" ) ;
148
+ // println!("{value:?} has children {children:?}");
139
149
stack. push ( RecNode {
140
150
parent,
141
151
value,
0 commit comments