Skip to content

Instantly share code, notes, and snippets.

@rizumita
Created October 25, 2017 21:50
Show Gist options
  • Save rizumita/d92d38e688695bb07c7640f2dd2cdfa5 to your computer and use it in GitHub Desktop.
Save rizumita/d92d38e688695bb07c7640f2dd2cdfa5 to your computer and use it in GitHub Desktop.
func foo(_ string: String) -> (String) -> String {
return { s in
let result = string + " " + s
print(result)
return result
}
}
let f: (String) -> String = foo("bar")
f("baz") // result of call is unused が発生
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment