packages/babel-plugin-proposal-partial-application/test/fixtures/general/multiple-calls/exec.js
raw| 1 | function add(a, b) { |
| 2 | return a + b; |
| 3 | } |
| 4 | |
| 5 | function square(x){ |
| 6 | return x * x; |
| 7 | } |
| 8 | |
| 9 | const foo = add(?, 1); |
| 10 | const bar = square(?); |
| 11 | |
| 12 | expect(bar(foo(2))).toEqual(9); |
| 13 | expect(foo(2)).toEqual(3); |
| 14 | expect(bar(4)).toEqual(16); |
| 15 | expect(foo.length).toEqual(1); |
| 16 | expect(foo.name).toEqual("add"); |
| 17 | expect(bar.length).toEqual(1); |
| 18 | expect(bar.name).toEqual("square"); |