Open
Conversation
tooooo1
reviewed
Aug 11, 2023
Member
tooooo1
left a comment
There was a problem hiding this comment.
코드 너무 깔끔해서 따로 코멘트 드릴게... 음... LGTM!!!!!!!
질문 답변
sum 함수의 추가 선언에 대한 고민: sum 함수를 따로 선언하는 것은 가독성 고민일 것 같아요. 투머치라고 보기보다는 선택의 문제라고 생각합니다.
함수 이름에 대한 고민: accumulate도 좋은데요? 음... 배열의 합계만을 계산하는 경우 sumArray, totalArray와 같은 이름이 있을 것 같네요
Member
Author
|
충일님 리뷰 감사합니다 !!
이 부분이 어제 테오님께 문의 드린 방향이랑 비슷한 것 같아요,
지금 생각해보니, accumulate 자체는 뭔가 암묵적 출력을 해줄 것만 같은 함수 이름인 것 같단 생각이 들어서 더 고민을 했던 것 같아요 ㅋㅋ큐ㅠ |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
사실 처음 문제를 만났을 때, 이게 뭐가 문제이지..? 라고 생각하긴 했습니다.
그래서 가장 먼저 한 생각이, reduce 쓰면 되지 않을까? 라는 생각이었고 for문을 reduce로 바꿔서 내장 메소드로 한 번 추상화를 했습니다.
그리고 reduce의 콜백함수를 선언하기 보다는 별도의 순수 함수를 따로 만들어서 추상화를 한 번 더 했습니다.
💬 질문 사항이에요
🤷♂️ 확인 받고 싶은 부분이에요
🔥 이건 꼭 확인해주세요