2013-04-15

Functional Design Primitives

9:49 PM Posted by Yuriy Polyulya , , ,
Design Primitives are the simples elements available in SW design.

Motivation:
     Goal of this post is define base set of functional design primitives (in Scala perspective) and define basic set of knowledge (categorised themes) necessary for understanding of Functional Design Principles and Patterns.

Plans:
     Will make wide description with Scala examples for all grops of primitives defined in this post.


Functional Design Primitives (base level):


  Group 1 - Common aspects:
     1.  Side Effect.
     2.  Pure Function.
     3.  Assignment / Single Assignment.
     4.  Immutable Object.

  Group 2 - Function perspective:
     1.  Function.
     2.  Anonymous Function / Lambda expression:
          -  Lambda calculus.

     3.  Recursion:
          -  Tail recursion.
          -  Branching recursion.
          -  Anonymous Function recursion - Y combinator.
          -  Recursive Data Type.

     4.  Higher Order Function.
     5.  Currying.
     6.  Partially applied functions.
     7.  Continuation passing style.

  Group 3 - Lazy features:
     1.  Lazy evaluation.
     2.  Closure.

  Group 4 - Pattern Matching:
     1.  Pattern Matching and Extractors.
     2.  Constructor Pattern Matching.
     3.  Partial Function.

  Group 5 - Polymorphism:
     1.  Monomorphic and Polymorphic Types.
     2.  Parametric Polymorphism:
          -  Kind.
          -  Higher-Kinded Type.
          -  Type Constructor and Type Class.

     3.  Ad-hoc Polymorphism:
          -  Bounded polymorphism.
          -  Function names overloading.
          -  Coercion.

     4.  Family Polymorphism.
     5.  Liskov substitutability.
     6.  Leibnizian equality.
     7.  Invariance, Covariance and Contravariance.
     8.  Implicits.

Functional Design Primitives (first level of Functional Abstraction):


     1.  Category.
     2.  Arrow.
     3.  Kleisli / Cokleisli Arrow.
     4.  Functor, Bifunctor.
     5.  Lifting.
     6.  Monoid.
     7.  Monad and Comonads.
     8.  Applicative.
     9.  Catamorphism.

Functional Design Primitives (second level of Functional Abstraction):


     1.   Void Value.
     2.   Identity Monad.
     3.   Maybe Monad.
     4.   State Monad.
     5.   I/O Monad.
     6.   Collections.
     7.   Internal/External Iterator.
     8.   Effect system.
     9.   Product Comonad.
     10.  Function Comonad.