News for hackers. Stuff that matters.
Re:Monads in JavaScript by oahziur on Tuesday July 21, 2015 @03:40AM (#9920939)
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.
Re:Monads in JavaScript by yoz-y on Tuesday July 21, 2015 @04:19AM (#9921024)
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.
Re:Monads in JavaScript by dllthomas on Tuesday July 21, 2015 @01:20PM (#9923924)
Interesting. Does addMultiple(7) bind a or c?