Core FP Concepts

624 views

Published on

FP Core Concepts

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
624
On SlideShare
0
From Embeds
0
Number of Embeds
132
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Core FP Concepts

  1. 1. Conceitos Funcionais
  2. 2. Functions as 1st Class Citizen • Syntax Sugar • Abstractions • Simplicity • Utilities • Less Code More things Done • Awesome for Algorithms/calculations
  3. 3. CORE Functional Programing Fundamental Principles 1. Lambda Calculus 2. High Order Functions 3. Immutability 4. No Side Effects
  4. 4. Lambda/Closure/Anonymous Function • Less Structure • Syntax Sugar • One time Usage • Work with High Order Functions
  5. 5. Lambda/Closure/Anonymous Function
  6. 6. High Order Functions • Pass Function by Parameter • Return Function • Ground for: • Lazyness • Composition
  7. 7. High Order Functions First-class-Function Lazyness
  8. 8. High Order Functions Composition <= First-class-Function (oo) <= High-Order-Function (FP)
  9. 9. Currying • Lambda Calculus, Parallelism • Optional in several languages not Haskell • Awesome for DSL Creation • Transform: Chained Functions into single Arg
  10. 10. Currying
  11. 11. Monads • FP way to deal with side effects • Similar to AOP Interceptors • Build Abstractions around your functions • It can encapsulate: • Control Flow (Option) • State Propagation (Io)
  12. 12. Monads
  13. 13. Conceitos Funcionais Obrigado !!!

×