This project contains coding examples for the Programming Paradigms course.
-
ImpureComputations: Examples of impure functions with different kinds of side effects
-
ExpressionsVsStatements: Illustrates referential transparency of pure computations vs statements and side effects
-
SideEffectComposition: Illustrates why side effects do not compose
-
KVRepoLaws: Defines and checks laws for the KVRepo algebra
-
EffectSystemIntuition: Illustrates how to turn effectful computations into pure ones by suspending them and compose them to build bigger computations.
-
FluentApi: Fluent api for collections
-
RefactorNulls: Exercise to refactor legacy code with nulls using Option
-
TimeStampProblem: Refactor exercise around side effects and testability
-
WarehouseDomain: Domain modelling exercise
-
TypeClass: Introducción a las type classes
-
MyList: Recursive data type
-
Recursion:
-
Learning resources:
- https://rockthejvm.com/ Code based video tutorials for Scala and FP
- https://www.manning.com/books/akka-in-action-second-edition Actor model in scala
- https://www.manning.com/books/functional-programming-in-scala-second-edition Red book: Intro to functional thinking in scala
- https://www.blurb.de/b/9603882-category-theory-for-programmers-scala-edition-pape