-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa5246f
commit 85f34aa
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { compose } from './compose' | ||
|
||
describe('pop', () => { | ||
it('더하기 함수와 곱하기합수를 합성했습니다.', () => { | ||
function add(a: number, b: number) { | ||
return a + b | ||
} | ||
function multiply(a: number, b: number) { | ||
return a * b | ||
} | ||
const result = compose(4, add(7), multiply(5)) | ||
assert(result).toBe(55) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* 출제자: 상현님 (Hansanghyeon) | ||
* Q. 각자의 방식으로 함수를 합성해보세요! | ||
*/ | ||
export const compose = (...arg: any) => { | ||
return null | ||
} |