Introduction to Scala Part3: Option & Pattern Matching

Bubu
4,430 views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Create your own Option type

  • Some extends Option
  • None is an object that extends Option

Goal of this exercice: create your own MyOption, MySome and MyNone. For the sake of simplicity, MyOption, MySome and MyNone will have simpler implementations

MySome
MyNone
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content