Tutorial by Examples

Let's say we have multiple data sources which include database, file, prompt and argumentList. Depending on chosen source we change our approach: def loadData(dataSource: Symbol): Try[String] = dataSource match { case 'database => loadDatabase() // Loading data from database case 'file =&g...

Page 1 of 1