Post

Replies

Boosts

Views

Activity

Use cases for closures vs. functions
I've been learning Swift for the last couple weeks on the weekends and I understand, from what I've read, that functions are basically closures. But, this confuses me because obviously a feature thats 100% redundant wouldn't be implemented, so when should you use closures vs functions? Are there times you can only use closures in Swift, or can you always use them interchangeably?
2
0
1k
Oct ’22