core fp concepts
DESCRIPTION
FP Core ConceptsTRANSCRIPT
![Page 1: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/1.jpg)
Conceitos Funcionais
![Page 2: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/2.jpg)
Functions as 1st Class Citizen
• Syntax Sugar• Abstractions• Simplicity• Utilities• Less Code More things Done• Awesome for Algorithms/calculations
![Page 3: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/3.jpg)
CORE Functional Programing Fundamental Principles
1. Lambda Calculus
2. High Order Functions
3. Immutability
4. No Side Effects
![Page 4: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/4.jpg)
Lambda/Closure/Anonymous Function
• Less Structure• Syntax Sugar• One time Usage• Work with High Order Functions
![Page 5: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/5.jpg)
Lambda/Closure/Anonymous Function
![Page 6: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/6.jpg)
High Order Functions
• Pass Function by Parameter• Return Function
• Ground for:• Lazyness• Composition
![Page 7: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/7.jpg)
High Order Functions
First-class-Function Lazyness
![Page 8: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/8.jpg)
High Order Functions
Composition
<= First-class-Function (oo)
<= High-Order-Function (FP)
![Page 9: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/9.jpg)
Currying
• Lambda Calculus, Parallelism• Optional in several languages not Haskell• Awesome for DSL Creation• Transform: Chained Functions into single Arg
![Page 10: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/10.jpg)
Currying
![Page 11: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/11.jpg)
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)
![Page 12: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/12.jpg)
Monads
![Page 13: Core FP Concepts](https://reader034.vdocument.in/reader034/viewer/2022042623/54bd83ce4a795929228b45fb/html5/thumbnails/13.jpg)
Conceitos Funcionais
Obrigado !!!