Skip to content

Commit

Permalink
Merge pull request #20 from function-and-mountain/hyeon
Browse files Browse the repository at this point in the history
2week compose 문제 추가
  • Loading branch information
Hansanghyeon authored Nov 22, 2023
2 parents aa5246f + 85f34aa commit f7f8305
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/example/src/2week/compose/compose.spec.ts
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)
})
})
7 changes: 7 additions & 0 deletions packages/example/src/2week/compose/compose.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* 출제자: 상현님 (Hansanghyeon)
* Q. 각자의 방식으로 함수를 합성해보세요!
*/
export const compose = (...arg: any) => {
return null
}

0 comments on commit f7f8305

Please sign in to comment.