How does Option act like a collection, when it isn't one?

限于喜欢 提交于 2019-12-02 03:26:56

In scaladoc, you can click the "by inheritance" ordering button (it appears just above the methods description). This should help you finding the concrete implementation of a given method. The jump to that class and have a look to the source (the links to the source appears in the class/trait/object description).

In the case of Options, there are methods called map, filter, etc.

When an implicit value is required, you will notice, either an implicit clause in the argument list, or a context bound like [A: MyImplicit] in the parameters. Implicit are usually imported or declared in the companion object.

If you have a more specification question/example, please let me know.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!