@@ -11,7 +11,7 @@ class Rectangle {
1111 }
1212}
1313
14- ( ) => {
14+ ( ( ) => {
1515 const filterIndexed = R . addIndex < number > ( R . filter ) ;
1616
1717 function lastTwo ( _val : number , idx : number , list : number [ ] ) {
@@ -20,9 +20,9 @@ class Rectangle {
2020
2121 // $ExpectType number[]
2222 filterIndexed ( lastTwo , [ 8 , 6 , 7 , 5 , 3 , 0 , 9 ] ) ; // => [0, 9]
23- } ;
23+ } ) ;
2424
25- ( ) => {
25+ ( ( ) => {
2626 function lastTwo ( _val : number , idx : number , list : number [ ] ) {
2727 return list . length - idx <= 2 ;
2828 }
@@ -33,18 +33,18 @@ class Rectangle {
3333 filterIndexed ( lastTwo , [ 8 , 6 , 7 , 5 , 3 , 0 , 9 ] ) ; // => [0, 9]
3434 const lastTwoFn = filterIndexed ( lastTwo ) ;
3535 lastTwoFn ( [ 8 , 6 , 7 , 5 , 3 , 0 , 9 ] ) ;
36- } ;
36+ } ) ;
3737
38- ( ) => {
38+ ( ( ) => {
3939 function plusFive ( num : number , idx : number , list : number [ ] ) {
4040 list [ idx ] = num + 5 ;
4141 }
4242
4343 // $ExpectType number[]
4444 R . addIndex < number > ( R . forEach ) ( plusFive ) ( [ 1 , 2 , 3 ] ) ; // => [6, 7, 8]
45- } ;
45+ } ) ;
4646
47- ( ) => {
47+ ( ( ) => {
4848 function squareEnds ( elt : number , idx : number , list : number [ ] ) {
4949 if ( idx === 0 || idx === list . length - 1 ) {
5050 return elt * elt ;
@@ -56,9 +56,9 @@ class Rectangle {
5656 R . addIndex < number > ( R . map ) ( squareEnds , [ 8 , 5 , 3 , 0 , 9 ] ) ; // => [64, 5, 3, 0, 81]
5757 // $ExpectType number[]
5858 R . addIndex < number > ( R . map ) ( squareEnds ) ( [ 8 , 5 , 3 , 0 , 9 ] ) ; // => [64, 5, 3, 0, 81]
59- } ;
59+ } ) ;
6060
61- ( ) => {
61+ ( ( ) => {
6262 const reduceIndexed = R . addIndex < string , { [ elem : string ] : number } > ( R . reduce ) ;
6363 const letters = [ 'a' , 'b' , 'c' ] ;
6464
@@ -73,9 +73,9 @@ class Rectangle {
7373 reduceIndexed ( objectify ) ( { } , letters ) ; // => { 'a': 0, 'b': 1, 'c': 2 }
7474 // $ExpectType { [elem: string]: number; }
7575 reduceIndexed ( objectify , { } ) ( letters ) ; // => { 'a': 0, 'b': 1, 'c': 2 }
76- } ;
76+ } ) ;
7777
78- ( ) => {
78+ ( ( ) => {
7979 function lastTwo ( _val : number , idx : number , list : number [ ] ) {
8080 return list . length - idx <= 2 ;
8181 }
@@ -85,9 +85,9 @@ class Rectangle {
8585 rejectIndexed ( lastTwo , [ 8 , 6 , 7 , 5 , 3 , 0 , 9 ] ) ; // => [8, 6, 7, 5, 3]
8686 // $ExpectType number[]
8787 rejectIndexed ( lastTwo ) ( [ 8 , 6 , 7 , 5 , 3 , 0 , 9 ] ) ; // => [8, 6, 7, 5, 3]
88- } ;
88+ } ) ;
8989
90- ( ) => {
90+ ( ( ) => {
9191 const mapIndexed = R . addIndex < string , string > ( R . map ) ;
9292 mapIndexed ( ( val : string , idx : number ) => `${ idx } -${ val } ` ) ( [ 'f' , 'o' , 'o' , 'b' , 'a' , 'r' ] ) ;
9393 // => ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r']
@@ -98,9 +98,9 @@ class Rectangle {
9898 [ new Rectangle ( 1 , 2 ) , new Rectangle ( 4 , 7 ) ] ,
9999 ) ;
100100 // => [2, 56]
101- } ;
101+ } ) ;
102102
103- ( ) => {
103+ ( ( ) => {
104104 const reduceIndexed = R . addIndex < string , string > ( R . reduce ) ;
105105 // $ExpectType string
106106 reduceIndexed ( ( acc : string , val : string , idx : number ) => `${ acc } ,${ idx } -${ val } ` , '' , [
@@ -112,4 +112,4 @@ class Rectangle {
112112 'r' ,
113113 ] ) ;
114114 // => ['0-f,1-o,2-o,3-b,4-a,5-r']
115- } ;
115+ } ) ;
0 commit comments