@@ -45,14 +45,14 @@ Three.prototype.cons = function (value) {
4545 return new Four ( value , this . a , this . b , this . c ) ;
4646} ;
4747
48- Three . prototype . node = function ( M ) {
48+ Three . prototype . _node = function ( M ) {
4949 return new Node3 ( this . measure ( M ) , this . a , this . b , this . c ) ;
5050} ;
5151
5252/**
5353 * It is assumed that p(i+|this|) is true.
5454 */
55- Three . prototype . splitDigit = function ( p , i , M ) {
55+ Three . prototype . _splitDigit = function ( p , i , M ) {
5656 assert ( p ( M . plus ( i , this . measure ( M ) ) ) ) ; // /!\ Potential Heisenbug generator.
5757 i = M . plus ( i , M . measure ( this . a ) ) ;
5858 if ( p ( i ) ) return new Split ( [ ] , this . a , [ this . b , this . c ] ) ;
@@ -72,17 +72,21 @@ Three.prototype._nodes_with_one = function (M, other) {
7272
7373Three . prototype . _nodes_with_two = function ( M , other ) {
7474 assert ( other instanceof Two ) ;
75- return [ other . node ( M ) , this . node ( M ) ] ;
75+ return [ other . _node ( M ) , this . _node ( M ) ] ;
7676} ;
7777
7878Three . prototype . _nodes_with_three = function ( M , other ) {
7979 assert ( other instanceof Three ) ;
80- return [ other . node ( M ) , this . node ( M ) ] ;
80+ return [ other . _node ( M ) , this . _node ( M ) ] ;
8181} ;
8282
8383Three . prototype . _nodes_with_four = function ( M , other ) {
8484 assert ( other instanceof Four ) ;
85- return [ node2 ( M , other . a , other . b ) , node2 ( M , other . c , other . d ) , this . node ( M ) ] ;
85+ return [
86+ node2 ( M , other . a , other . b ) ,
87+ node2 ( M , other . c , other . d ) ,
88+ this . _node ( M ) ,
89+ ] ;
8690} ;
8791
8892Three . prototype . _nodes_with_list = function ( M , list , other ) {
@@ -95,20 +99,20 @@ Three.prototype._nodes_with_list_and_one = function (M, list, other) {
9599 // eslint-disable-next-line default-case
96100 switch ( list . length ) {
97101 case 1 :
98- return [ node2 ( M , other . a , list [ 0 ] ) , this . node ( M ) ] ;
102+ return [ node2 ( M , other . a , list [ 0 ] ) , this . _node ( M ) ] ;
99103 case 2 :
100- return [ node3 ( M , other . a , list [ 0 ] , list [ 1 ] ) , this . node ( M ) ] ;
104+ return [ node3 ( M , other . a , list [ 0 ] , list [ 1 ] ) , this . _node ( M ) ] ;
101105 case 3 :
102106 return [
103107 node2 ( M , other . a , list [ 0 ] ) ,
104108 node2 ( M , list [ 1 ] , list [ 2 ] ) ,
105- this . node ( M ) ,
109+ this . _node ( M ) ,
106110 ] ;
107111 case 4 :
108112 return [
109113 node3 ( M , other . a , list [ 0 ] , list [ 1 ] ) ,
110114 node2 ( M , list [ 2 ] , list [ 3 ] ) ,
111- this . node ( M ) ,
115+ this . _node ( M ) ,
112116 ] ;
113117 }
114118} ;
@@ -119,16 +123,20 @@ Three.prototype._nodes_with_list_and_two = function (M, list, other) {
119123 // eslint-disable-next-line default-case
120124 switch ( list . length ) {
121125 case 1 :
122- return [ node3 ( M , other . a , other . b , list [ 0 ] ) , this . node ( M ) ] ;
126+ return [ node3 ( M , other . a , other . b , list [ 0 ] ) , this . _node ( M ) ] ;
123127 case 2 :
124- return [ other . node ( M ) , node2 ( M , list [ 0 ] , list [ 1 ] ) , this . node ( M ) ] ;
128+ return [ other . _node ( M ) , node2 ( M , list [ 0 ] , list [ 1 ] ) , this . _node ( M ) ] ;
125129 case 3 :
126- return [ other . node ( M ) , node3 ( M , list [ 0 ] , list [ 1 ] , list [ 2 ] ) , this . node ( M ) ] ;
130+ return [
131+ other . _node ( M ) ,
132+ node3 ( M , list [ 0 ] , list [ 1 ] , list [ 2 ] ) ,
133+ this . _node ( M ) ,
134+ ] ;
127135 case 4 :
128136 return [
129137 node3 ( M , other . a , other . b , list [ 0 ] ) ,
130138 node3 ( M , list [ 1 ] , list [ 2 ] , list [ 3 ] ) ,
131- this . node ( M ) ,
139+ this . _node ( M ) ,
132140 ] ;
133141 }
134142} ;
@@ -142,18 +150,22 @@ Three.prototype._nodes_with_list_and_three = function (M, list, other) {
142150 return [
143151 node2 ( M , other . a , other . b ) ,
144152 node2 ( M , other . c , list [ 0 ] ) ,
145- this . node ( M ) ,
153+ this . _node ( M ) ,
146154 ] ;
147155 case 2 :
148- return [ other . node ( M ) , node2 ( M , list [ 0 ] , list [ 1 ] ) , this . node ( M ) ] ;
156+ return [ other . _node ( M ) , node2 ( M , list [ 0 ] , list [ 1 ] ) , this . _node ( M ) ] ;
149157 case 3 :
150- return [ other . node ( M ) , node3 ( M , list [ 0 ] , list [ 1 ] , list [ 2 ] ) , this . node ( M ) ] ;
158+ return [
159+ other . _node ( M ) ,
160+ node3 ( M , list [ 0 ] , list [ 1 ] , list [ 2 ] ) ,
161+ this . _node ( M ) ,
162+ ] ;
151163 case 4 :
152164 return [
153- other . node ( M ) ,
165+ other . _node ( M ) ,
154166 node2 ( M , list [ 0 ] , list [ 1 ] ) ,
155167 node2 ( M , list [ 2 ] , list [ 3 ] ) ,
156- this . node ( M ) ,
168+ this . _node ( M ) ,
157169 ] ;
158170 }
159171} ;
@@ -167,27 +179,27 @@ Three.prototype._nodes_with_list_and_four = function (M, list, other) {
167179 return [
168180 node2 ( M , other . a , other . b ) ,
169181 node3 ( M , other . c , other . d , list [ 0 ] ) ,
170- this . node ( M ) ,
182+ this . _node ( M ) ,
171183 ] ;
172184 case 2 :
173185 return [
174186 node3 ( M , other . a , other . b , other . c ) ,
175187 node3 ( M , other . d , list [ 0 ] , list [ 1 ] ) ,
176- this . node ( M ) ,
188+ this . _node ( M ) ,
177189 ] ;
178190 case 3 :
179191 return [
180192 node2 ( M , other . a , other . b ) ,
181193 node2 ( M , other . c , other . d ) ,
182194 node3 ( M , list [ 0 ] , list [ 1 ] , list [ 2 ] ) ,
183- this . node ( M ) ,
195+ this . _node ( M ) ,
184196 ] ;
185197 case 4 :
186198 return [
187199 node3 ( M , other . a , other . b , other . c ) ,
188200 node2 ( M , other . d , list [ 0 ] ) ,
189201 node3 ( M , list [ 1 ] , list [ 2 ] , list [ 3 ] ) ,
190- this . node ( M ) ,
202+ this . _node ( M ) ,
191203 ] ;
192204 }
193205} ;
0 commit comments