Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Option is a monad. All monads are functors. The key characteristic of a functor is that you can map over it. So why does it surprise you to be using map with Option?

The Scala docs (http://www.scala-lang.org/api/current/index.html#scala.Optio...) tell you this in the second paragraph.

To be honest, and I'm being a bit snarky here I know, I think you're just fairly ignorant of basic functional programming techniques. That's not a crime, but don't mouth off about functional programming if you know so little about it.



Agreed -- the thought in my head was simply that Paul, while well-intended, fails to understand functional (and category theory) concepts and that Option is best understood and used when treating it as a monad (which it is).




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: