Skip to content

Conversation

@jhjo-tech
Copy link

No description provided.

@jhjo-tech jhjo-tech changed the title 챕피언 선택 번호에 따른 이름 배열에 넣기. 챔피언 선택 번호에 따른 이름 배열에 넣기. Nov 12, 2019
Copy link
Owner

@wanbok wanbok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if let 등으로 unwrapping하지 않고 고계함수만을 사용해 잘 만셨습니다!

.filter{ $0["key"] as? String == stringKey }
.compactMap{ $0["name"] as? String }
.first
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

두가지의 고계 함수들을 하나로 합칠 만한 것들이 보입니다.
인지적 복잡도 점수를 더 낮춰가는 방향으로, 연습삼아 변경해보시면 좋을 것 같습니다. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants