@@ -87,75 +87,88 @@ Predef1 = class Predef {
8787 static pipeFrom ( f1 , x3 ) {
8888 return runtime . safeCall ( f1 ( x3 ) )
8989 }
90- static andThen ( f2 , g ) {
91- return ( x4 ) => {
90+ static tap ( x4 , f2 ) {
91+ let tmp ;
92+ tmp = runtime . safeCall ( f2 ( x4 ) ) ;
93+ return ( tmp , x4 )
94+ }
95+ static pat ( f3 , x5 ) {
96+ let tmp ;
97+ tmp = runtime . safeCall ( f3 ( x5 ) ) ;
98+ return ( tmp , x5 )
99+ }
100+ static andThen ( f4 , g ) {
101+ return ( x6 ) => {
92102 let tmp ;
93- tmp = runtime . safeCall ( f2 ( x4 ) ) ;
103+ tmp = runtime . safeCall ( f4 ( x6 ) ) ;
94104 return runtime . safeCall ( g ( tmp ) )
95105 }
96106 }
97- static compose ( f3 , g1 ) {
98- return ( x4 ) => {
107+ static compose ( f5 , g1 ) {
108+ return ( x6 ) => {
99109 let tmp ;
100- tmp = runtime . safeCall ( g1 ( x4 ) ) ;
101- return runtime . safeCall ( f3 ( tmp ) )
110+ tmp = runtime . safeCall ( g1 ( x6 ) ) ;
111+ return runtime . safeCall ( f5 ( tmp ) )
102112 }
103113 }
104- static passTo ( receiver , f4 ) {
114+ static passTo ( receiver , f6 ) {
105115 return ( ...args ) => {
106- return runtime . safeCall ( f4 ( receiver , ...args ) )
116+ return runtime . safeCall ( f6 ( receiver , ...args ) )
107117 }
108118 }
109- static call ( receiver1 , f5 ) {
119+ static call ( receiver1 , f7 ) {
110120 return ( ...args ) => {
111- return f5 . call ( receiver1 , ...args )
121+ return f7 . call ( receiver1 , ...args )
112122 }
113123 }
114- static pass1 ( f6 ) {
124+ static pass1 ( f8 ) {
115125 return ( ...xs ) => {
116- return runtime . safeCall ( f6 ( xs [ 0 ] ) )
126+ return runtime . safeCall ( f8 ( xs [ 0 ] ) )
117127 }
118128 }
119- static pass2 ( f7 ) {
129+ static pass2 ( f9 ) {
120130 return ( ...xs ) => {
121- return runtime . safeCall ( f7 ( xs [ 0 ] , xs [ 1 ] ) )
131+ return runtime . safeCall ( f9 ( xs [ 0 ] , xs [ 1 ] ) )
122132 }
123133 }
124- static pass3 ( f8 ) {
134+ static pass3 ( f10 ) {
125135 return ( ...xs ) => {
126- return runtime . safeCall ( f8 ( xs [ 0 ] , xs [ 1 ] , xs [ 2 ] ) )
136+ return runtime . safeCall ( f10 ( xs [ 0 ] , xs [ 1 ] , xs [ 2 ] ) )
127137 }
128138 }
139+ static passing ( f11 , ...args ) {
140+ return f11 . bind ( null , ...args )
141+ }
129142 static print ( ...xs ) {
130143 let tmp , tmp1 ;
131144 tmp = Predef . map ( Predef . renderAsStr ) ;
132145 tmp1 = runtime . safeCall ( tmp ( ...xs ) ) ;
133146 return runtime . safeCall ( globalThis . console . log ( ...tmp1 ) )
134147 }
135- static printRaw ( x4 ) {
148+ static printRaw ( x6 ) {
136149 let tmp ;
137- tmp = Predef . render ( x4 ) ;
150+ tmp = Predef . render ( x6 ) ;
138151 return runtime . safeCall ( globalThis . console . log ( tmp ) )
139152 }
140153 static interleave ( sep ) {
141- return ( ...args ) => {
154+ return ( ...args1 ) => {
142155 let res , len , i , scrut , idx , scrut1 , scrut2 , tmp , tmp1 , tmp2 , tmp3 , tmp4 , tmp5 , tmp6 , tmp7 ;
143- scrut2 = args . length === 0 ;
156+ scrut2 = args1 . length === 0 ;
144157 if ( scrut2 === true ) {
145158 return [ ]
146159 } else {
147- tmp = args . length * 2 ;
160+ tmp = args1 . length * 2 ;
148161 tmp1 = tmp - 1 ;
149162 tmp2 = globalThis . Array ( tmp1 ) ;
150163 res = tmp2 ;
151- len = args . length ;
164+ len = args1 . length ;
152165 i = 0 ;
153166 tmp8: while ( true ) {
154167 scrut = i < len ;
155168 if ( scrut === true ) {
156169 tmp3 = i * 2 ;
157170 idx = tmp3 ;
158- res [ idx ] = args [ i ] ;
171+ res [ idx ] = args1 [ i ] ;
159172 tmp4 = i + 1 ;
160173 i = tmp4 ;
161174 scrut1 = i < len ;
@@ -282,14 +295,14 @@ Predef1 = class Predef {
282295 static tupleGet ( xs3 , i1 ) {
283296 return globalThis . Array . prototype . at . call ( xs3 , i1 )
284297 }
285- static map ( f9 ) {
298+ static map ( f12 ) {
286299 return ( ...xs4 ) => {
287300 let tmp ;
288- tmp = Predef . pass1 ( f9 ) ;
301+ tmp = Predef . pass1 ( f12 ) ;
289302 return runtime . safeCall ( xs4 . map ( tmp ) )
290303 }
291304 }
292- static fold ( f10 ) {
305+ static fold ( f13 ) {
293306 return ( init , ...rest ) => {
294307 let i2 , len , scrut , tmp , tmp1 , tmp2 , tmp3 ;
295308 i2 = 0 ;
@@ -298,7 +311,7 @@ Predef1 = class Predef {
298311 scrut = i2 < len ;
299312 if ( scrut === true ) {
300313 tmp = runtime . safeCall ( rest . at ( i2 ) ) ;
301- tmp1 = runtime . safeCall ( f10 ( init , tmp ) ) ;
314+ tmp1 = runtime . safeCall ( f13 ( init , tmp ) ) ;
302315 init = tmp1 ;
303316 tmp2 = i2 + 1 ;
304317 i2 = tmp2 ;
@@ -312,7 +325,7 @@ Predef1 = class Predef {
312325 return init
313326 }
314327 }
315- static foldr ( f11 ) {
328+ static foldr ( f14 ) {
316329 return ( first , ...rest ) => {
317330 let len , i2 , init , scrut , scrut1 , tmp , tmp1 , tmp2 , tmp3 , tmp4 , tmp5 ;
318331 len = rest . length ;
@@ -330,7 +343,7 @@ Predef1 = class Predef {
330343 tmp2 = i2 - 1 ;
331344 i2 = tmp2 ;
332345 tmp3 = runtime . safeCall ( rest . at ( i2 ) ) ;
333- tmp4 = runtime . safeCall ( f11 ( tmp3 , init ) ) ;
346+ tmp4 = runtime . safeCall ( f14 ( tmp3 , init ) ) ;
334347 init = tmp4 ;
335348 tmp5 = runtime . Unit ;
336349 continue tmp6;
@@ -339,7 +352,7 @@ Predef1 = class Predef {
339352 }
340353 break ;
341354 }
342- return runtime . safeCall ( f11 ( first , init ) )
355+ return runtime . safeCall ( f14 ( first , init ) )
343356 }
344357 }
345358 }
0 commit comments