2. Example
ï Give me a list of numbers from 1 to 100.
Tell me how ? Tell me what ?
3. What?
Functional programming is a programming paradigm
that treats computation as the evaluation of
mathematical functions and avoids state and mutable
data.
y = f (x)
A function is a transformation. It transforms one or more inputs into exactly
one output.
4. Why?
ï Succinct & simpler programs
ï Small code base, low dev/maintenance cost.
ï A number of powerful new ways to structure and
reason about programs.
ï Immutability
ï High order function
ï Pattern Matching
ïâŠ
5. How?
ï Immutability
ï Type Inference
ï Recursion
ï High Order Functions
ï Partial Application
ï Pattern Matching
ï Unit of Measure
10. High order Function
ï Functions as First Class Member
ï Functions that accept a function as a parameter or
returns a function
11. High Order Function
ï Map
ï Fold
ï Zip
ï Filter
ï Pipeline
ï Function Composition
ï Partial Application
12. Pattern Match
ï Compare data with a logical structure
ï Decompose data into its constituent parts
ï Extract information from constructs in various
ways
13. Unit of Measure
ï Floating point and signed integer values in F# can
have associated units of measure.
ï Compile time checking.
14. Functional Programming in Real World
ï Erlang developed in Ericsson widely used in T-
Mobile, Facebook....
ï Industry
ï Communication
ï Finance industry
ï Scientific computation
ï AI
ï Languages support FP
ï Haskell
ï Scala
ï Python
ï Clojure
ï âŠ
15. Resources
ï The F# Survival Guide
ï Functional Programming for the Real World