Skip to content

Instantly share code, notes, and snippets.

@jungbin-kim
Created June 29, 2018 07:12
Show Gist options
  • Save jungbin-kim/f0f6b1928c267d4db8e1f2ad18eecb1d to your computer and use it in GitHub Desktop.
Save jungbin-kim/f0f6b1928c267d4db8e1f2ad18eecb1d to your computer and use it in GitHub Desktop.
특정 item 제외한 리스트 만들기
// excludeNum의 int 값을 제외한 값들을 얻기
val excludeNum = Seq(40501, 40500, 40502, 40527, 40533, 40554, 40566, 40516, 40523)
val range = (40498 to 40574)
val result = range.filterNot(i => excludeNum.contains(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment