Hacker News new | ask | show | jobs
by oahziur 3982 days ago
I think Maybe monad could be really useful in Swift (Apple's new language). Some people use it for chaining up the optional type. However, I found that the lack of functional feature such as curried parameters in swift makes it less useful.
1 comments

You can write a Swift function with curried parameters.

    func addMultiple(#a: Int)(b: Int)(c: Int) -> Int {
      return a + b + c
    }
It can not auto-curry parameters, but at worst you can wrap functions in their curried couter-parts.
Interesting. Does addMultiple(7) bind a or c?