3 ms·
I'll be honest, i have no idea what any of the stuff written on that page means. Can you show me the implementation of that class in pure Scala code?
by Mithaldu 13y ago
I'll be honest, i have no idea what any of the stuff written on that page means. Can you show me the implementation of that class in pure Scala code?
- saryant 13y agoHere's the implementation: https://github.com/scala/scala/blob/v2.10.3/src/library/scala/Option.scala#L1 https://github.com/scala/scala/blob/v2.10.3/src/library/scal... (FYI, many Scaladocs have links back to the code on Github)
- Mithaldu 13y agoAlright, so it really is just a Scala class with some handy shortcuts. Please do note though that the docs you linked do not think it is a monad, just that it's easy to think of it as one. Edit: In fact, it kinda smells like how Perl works when you do this: no warnings 'undefined';
- frowaway001 13y ago> Please do note though that the docs you linked do not think it is a monad, just that it's easy to think of it as one. Heh?