Skip to content
Andrzej Jóźwiak edited this page Feb 6, 2019 · 7 revisions

(Part 1) Functions and composition

  • What is Functional Programming?
  • Comparing Functional Programming with Object Oriented Programming
  • What is Imperative style?
  • What is Declarative style?
  • What is a function? Or maybe what is it not?
  • What is referential transparency? and why is it helpful?
  • What is a Pure and Impure function? and why should we care?
  • A brief look at side effects
  • What are intentional and non intentional side effects?
  • What is currying?
  • What is partial application?

(Part 2) Higher Order Functions

  • Function as a value? Why we have problems with adjusting to this idea?
  • What are higher order functions? How can we use them effectively?
  • What benefits we get from abstracting simple looping?
  • What issues does Java create when working with higher order functions?
  • Is Kotlin solving anything in this department?
  • Why higher order functions are important? (quick look into Haskell)
  • Does order of function arguments have a meaning? (point free notation), why OO is messing this up?

(Part 3) Algebraic Data Types and expressing optionality

  • What are Sum Types? How can they be expressed in Java/Kotlin?
  • What are Product Types? Why are they a bit troublesome to work with?
  • Combining Sum Types and Product Types into a single Type
  • Are Enums a kind of a Sum Type?
  • What is pattern matching?
  • What is structural pattern matching?
  • Can we work with ADTs without pattern matching?
  • Are Algebraic Data Types contradicting OO (encapsulation)?
  • Are ADTs the same as Anemic Domain Model? (is it an OO anti-pattern?)
  • Can sum type/product type syntax be better and less verbose?
  • How can ADTs be used to express optionality (for partial functions)?
  • Creating a Maybe<A> type
  • Other useful ADTs: Try, Either
  • Beyond Maybe, Try and Either. basic modelling of the domain with our custom algebras

(Part 4) Recursion, Laziness and Streams

  • Recursion? Is there something like a "stack safe" recursion?
  • Recursion vs corecursion
  • Tail Call Optimization or Tail Call Elimination (or why Haskell, F#, Scala do not blow the stack)
  • Trampolines as a way of simulating stack safe recursion
  • Memoization as a way of trading execution time for memory
  • Immutability? Can we write useful immutable code?
  • A case of fully immutable State machine?
  • Lazy initialization vs lazy processing
  • Types of processing (PUSH vs PULL based)
  • Creating a lazy "stream-like" data structure, is it doable in Java?
  • A quick dip into the design of Java 8 Stream and Kotlin's Sequence

(Part 5) Functional architecture or putting everything to use (+what issues we may face)

  • How do OO design patterns translate to Functional Programming?
  • Stringly-typed vs Strongly-typed (one letter but great difference)
  • Making illegal state unrepresentable!
  • Designing for errors, keeping them as a part of your domain
  • How to mix pure and impure code?
  • Hexagonal architecture (ports and adapters) and why its natural in FP?
  • Two types of pushing responsibility with types: backward (caller handles inputs) and forward (caller handles outputs)