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.
[ Parent
| on HN ]
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.