Christian Tietze

  • Posts
  • Books
  • Apps
  • Work With Me
  • Contact

Currying and Treating Instance Methods as Curried Functions

Mar 31st, 2016

Currying is a very useful and interesting thing. It means that you can write functions in parts. If you don’t provide all parts at once, you won’t get the “real” result but a closure that accepts the missing parameters. Like this, with spacing added to reveal how the nested closure maps to the chain of return types:

Continue reading …

  • ∞ Permalink
  • • Comments
  • • Tags:
    • currying
    • swift
    • closure

Contact • Newsletter • blog post feed
Become an affiliate • Legal Information • Twitter

Except where otherwise noted, content on this site is licensed CC BY-SA 4.0.