Skip to content

mone/empty-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Episode 1

Stuff

  • val/var/def/lazy
  • String/Int
  • object/trait/class (abstract?)
  • Constructor and public values
  • The apply method / everything is a function (e.g. +)
  • Companion object
  • case class
  • apply / copy
  • Tuples
  • ScalaTest
  • sbt
  • sbt run / sbt test
  • open sbt console
  • open idea scratch

Excercise

  • Write a case class containing a position and a username (both are strings)
    • Write a function to replace the position
    • Obviously with tests (verify the original case class wasn't changed)
    • add a counter field that counts how many times the object changed position
  • Add a new case class that only contains the username
    • both case classes need to implement the same trait (trait contains the username)

Episode 2

Stuff

  • if
  • Match
  • Collections
    • List
  • Monads
    • Either
    • Try
    • Option
  • for-comprehension

Excercise

https://github.com/trayio/scala-be-interview/blob/master/task5/src/main/scala/io/tray/UserScoreService.scala https://github.com/trayio/scala-be-interview/blob/master/task1/src/main/scala/io/tray/services/WorkflowService.scala

Episode 3

  • Implicits
  • currying
  • partial function
  • Futures
  • Value Classes
  • Tagged types
  • Pure config

Excercise

[https://github.com/trayio/scala-be-interview/blob/master/task2/src/main/scala/io/tray/services/UserService.scala]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages