@@ -16,7 +16,7 @@ function cond(...clauses) {
1616
1717function run_list_generators ( generator , generators ) {
1818 if ( generators . length === 0 ) {
19- return generator . map ( x => {
19+ return generator . map ( ( x ) => {
2020 if ( Array . isArray ( x ) ) {
2121 return x ;
2222 }
@@ -36,29 +36,24 @@ function run_list_generators(generator, generators) {
3636}
3737
3838function _for ( expression , generators , collectable_protocol , into = [ ] ) {
39- let [ result , fun ] = collectable_protocol . into ( into ) ;
39+ const [ result , fun ] = collectable_protocol . into ( into ) ;
40+ let accumulatingResult = result ;
4041
4142 const generatedValues = run_list_generators ( generators . pop ( ) ( ) , generators ) ;
4243
4344 for ( const value of generatedValues ) {
4445 if ( expression . guard . apply ( this , value ) ) {
45- result = fun (
46- result ,
47- new Core . Tuple ( Symbol . for ( 'cont' ) , expression . fn . apply ( this , value ) )
46+ accumulatingResult = fun (
47+ accumulatingResult ,
48+ new Core . Tuple ( Symbol . for ( 'cont' ) , expression . fn . apply ( this , value ) ) ,
4849 ) ;
4950 }
5051 }
5152
52- return fun ( result , Symbol . for ( 'done' ) ) ;
53+ return fun ( accumulatingResult , Symbol . for ( 'done' ) ) ;
5354}
5455
55- function _try (
56- do_fun ,
57- rescue_function ,
58- catch_fun ,
59- else_function ,
60- after_function
61- ) {
56+ function _try ( do_fun , rescue_function , catch_fun , else_function , after_function ) {
6257 let result = null ;
6358
6459 try {
@@ -153,7 +148,7 @@ function receive(clauses, timeout = 0, timeoutFn = () => true) {
153148 clause . pattern ,
154149 messages [ i ] ,
155150 clause . guard ,
156- NOMATCH
151+ NOMATCH ,
157152 ) ;
158153
159154 if ( value !== NOMATCH ) {
0 commit comments