際際滷

際際滷Share a Scribd company logo
Functional Programming
As simple as it could be
By: Ayat Khraisat
What we are going to discuss?
 We are not going to discuss code.
 Whats pure function is?
 First class citizens, higher order functions.
 Referentially Transparent.
 Functional, Imperative or Reactive.
 Functional benefits.
We are not talking about something new
Pure Functions
 You are not pure if you changes
with time.
 You are not pure if you changes
you answer.
 You are not pure if you mutate
the system state or any side
effects.
 You not pure if you depends on
global state.
Change state produces Bugs
So
Use constants as much as you can.
No statements just expressions. Also as much as you can
No void functions.
Higher Order Functions
a function that takes function or returns
Function is considered First Class Citizen if it
can assigned to variables or stored in data
structures and and sent/returned from other one.
Referentially transparent
There are many ways to REFERENCE that
thing.
You should read transparent to mean
doesnt make a difference
A function Referentially transparent
is call to this method may be
replaced by its return value
X= 5+(1+3) or X= 5+4 or X=9
Functional does not mean Reactive
Functional programming does not conflict with OOP
Why Should we change?
1. No Asking whats is the state? Easier Debugging
2. Simpler Easier and more Cleaner.
3. less NPE.
4. Less change state errors.
5. Less Interfaces and delegates.
6. Reusability.
7. You will find more when you start using it.
Functional Programming Benefits
No program can be functional forever
At some point, it needs to be
imperative and spell out to the
computer exactly how to do something,
and it needs to modify state (whether
that is updating a View, writing to the
server, or just printing to console)
What do you think, should we change?

More Related Content

Similar to Functional programmning (20)

Declarative Network Configuration
Declarative Network Configuration Declarative Network Configuration
Declarative Network Configuration
Salesforce Engineering
Functional Programming in Java
Functional Programming in JavaFunctional Programming in Java
Functional Programming in Java
Narendran Solai Sridharan
CPP11 - Function Design
CPP11 - Function DesignCPP11 - Function Design
CPP11 - Function Design
Michael Heron
Functional programming
Functional programmingFunctional programming
Functional programming
PiumiPerera7
Refactoring
RefactoringRefactoring
Refactoring
AngelLuisBlasco
Programa巽達o reativa functional com java 8
Programa巽達o reativa functional com java 8Programa巽達o reativa functional com java 8
Programa巽達o reativa functional com java 8
Diego Pacheco
Functional Programming for OO Programmers (part 1)
Functional Programming for OO Programmers (part 1)Functional Programming for OO Programmers (part 1)
Functional Programming for OO Programmers (part 1)
Calvin Cheng
Why functional programming in C# & F#
Why functional programming in C# & F#Why functional programming in C# & F#
Why functional programming in C# & F#
Riccardo Terrell
Introduction to Functional programming
Introduction to Functional programmingIntroduction to Functional programming
Introduction to Functional programming
Ny Fanilo Andrianjafy, B.Eng.
Introduction to Functional Programming
Introduction to Functional ProgrammingIntroduction to Functional Programming
Introduction to Functional Programming
Dave Fancher
Understanding Logical Structures: Sequence, Selection, and Repetition
Understanding Logical Structures: Sequence, Selection, and RepetitionUnderstanding Logical Structures: Sequence, Selection, and Repetition
Understanding Logical Structures: Sequence, Selection, and Repetition
Ismail Hussain
Logical Structures
Logical StructuresLogical Structures
Logical Structures
Ismail Hussain
Exploring the Real Power of Functional Programming
Exploring the Real Power of Functional ProgrammingExploring the Real Power of Functional Programming
Exploring the Real Power of Functional Programming
Knoldus Inc.
RxSwift
RxSwiftRxSwift
RxSwift
Sally Ahmed
Functional Swift
Functional SwiftFunctional Swift
Functional Swift
Geison Goes
Clean code quotes - Cita巽探es e provoca巽探es
Clean code quotes - Cita巽探es e provoca巽探esClean code quotes - Cita巽探es e provoca巽探es
Clean code quotes - Cita巽探es e provoca巽探es
Andr辿 de Fontana Ignacio
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
Eman Mohamed
Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...
Alain Lompo
Getting started with FP IO
Getting started with FP IOGetting started with FP IO
Getting started with FP IO
Knoldus Inc.
Managing state in modern React web applications
Managing state in modern React web applicationsManaging state in modern React web applications
Managing state in modern React web applications
Jon Preece
CPP11 - Function Design
CPP11 - Function DesignCPP11 - Function Design
CPP11 - Function Design
Michael Heron
Functional programming
Functional programmingFunctional programming
Functional programming
PiumiPerera7
Programa巽達o reativa functional com java 8
Programa巽達o reativa functional com java 8Programa巽達o reativa functional com java 8
Programa巽達o reativa functional com java 8
Diego Pacheco
Functional Programming for OO Programmers (part 1)
Functional Programming for OO Programmers (part 1)Functional Programming for OO Programmers (part 1)
Functional Programming for OO Programmers (part 1)
Calvin Cheng
Why functional programming in C# & F#
Why functional programming in C# & F#Why functional programming in C# & F#
Why functional programming in C# & F#
Riccardo Terrell
Introduction to Functional Programming
Introduction to Functional ProgrammingIntroduction to Functional Programming
Introduction to Functional Programming
Dave Fancher
Understanding Logical Structures: Sequence, Selection, and Repetition
Understanding Logical Structures: Sequence, Selection, and RepetitionUnderstanding Logical Structures: Sequence, Selection, and Repetition
Understanding Logical Structures: Sequence, Selection, and Repetition
Ismail Hussain
Exploring the Real Power of Functional Programming
Exploring the Real Power of Functional ProgrammingExploring the Real Power of Functional Programming
Exploring the Real Power of Functional Programming
Knoldus Inc.
Functional Swift
Functional SwiftFunctional Swift
Functional Swift
Geison Goes
Clean code quotes - Cita巽探es e provoca巽探es
Clean code quotes - Cita巽探es e provoca巽探esClean code quotes - Cita巽探es e provoca巽探es
Clean code quotes - Cita巽探es e provoca巽探es
Andr辿 de Fontana Ignacio
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
Eman Mohamed
Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...
Alain Lompo
Getting started with FP IO
Getting started with FP IOGetting started with FP IO
Getting started with FP IO
Knoldus Inc.
Managing state in modern React web applications
Managing state in modern React web applicationsManaging state in modern React web applications
Managing state in modern React web applications
Jon Preece

Recently uploaded (20)

Byteexpo Call Center - Presentation.pptx
Byteexpo Call Center - Presentation.pptxByteexpo Call Center - Presentation.pptx
Byteexpo Call Center - Presentation.pptx
hmk11790
Will Ai Eat the Industrial World? The End of Engineering as We Know it
Will Ai Eat the Industrial World? The End of Engineering as We Know itWill Ai Eat the Industrial World? The End of Engineering as We Know it
Will Ai Eat the Industrial World? The End of Engineering as We Know it
Christian Dahlen
Movavi Screen Recorder Studio 2025 crack Free Download
Movavi Screen Recorder Studio 2025 crack Free DownloadMovavi Screen Recorder Studio 2025 crack Free Download
Movavi Screen Recorder Studio 2025 crack Free Download
imran03kr
TVersity Pro Media Server Free CRACK Download
TVersity Pro Media Server Free CRACK DownloadTVersity Pro Media Server Free CRACK Download
TVersity Pro Media Server Free CRACK Download
mohsinrazakpa43
Lecture2_REQUIREMENT_Process__Modelss.pptx
Lecture2_REQUIREMENT_Process__Modelss.pptxLecture2_REQUIREMENT_Process__Modelss.pptx
Lecture2_REQUIREMENT_Process__Modelss.pptx
Aqsa162589
Microsoft Office Crack 2019 Free Download
Microsoft Office Crack 2019 Free DownloadMicrosoft Office Crack 2019 Free Download
Microsoft Office Crack 2019 Free Download
tayab01kp
IObit Driver Booster Free 12.3.0.557 Free Download
IObit Driver Booster Free 12.3.0.557 Free DownloadIObit Driver Booster Free 12.3.0.557 Free Download
IObit Driver Booster Free 12.3.0.557 Free Download
blouch33kp
Adobe XD Crack Version 2025 Free Download
Adobe XD Crack Version 2025 Free DownloadAdobe XD Crack Version 2025 Free Download
Adobe XD Crack Version 2025 Free Download
mohsinrazakpa67
Wondershare Filmora Crack 2025 For Windows Free
Wondershare Filmora Crack 2025 For Windows FreeWondershare Filmora Crack 2025 For Windows Free
Wondershare Filmora Crack 2025 For Windows Free
mohsinrazakpa43
Adobe Illustrator Crack Download (Latest 2025)
Adobe Illustrator Crack Download (Latest 2025)Adobe Illustrator Crack Download (Latest 2025)
Adobe Illustrator Crack Download (Latest 2025)
blouch36kp
The Evolution of Microsoft Project Portfolio Management
The Evolution of Microsoft Project Portfolio ManagementThe Evolution of Microsoft Project Portfolio Management
The Evolution of Microsoft Project Portfolio Management
OnePlan Solutions
mORMot 2 - Pascal Cafe 2025 in Nederlands
mORMot 2 - Pascal Cafe 2025 in NederlandsmORMot 2 - Pascal Cafe 2025 in Nederlands
mORMot 2 - Pascal Cafe 2025 in Nederlands
Arnaud Bouchez
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with EaseCypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Shubham Joshi
Rights, Copyrights, and Licences for Software Engineering Research v1.0
Rights, Copyrights, and Licences for Software Engineering Research v1.0Rights, Copyrights, and Licences for Software Engineering Research v1.0
Rights, Copyrights, and Licences for Software Engineering Research v1.0
Yann-Ga谷l Gu辿h辿neuc
6 Best AI Tools for Contract Management.pdf
6 Best AI Tools for Contract Management.pdf6 Best AI Tools for Contract Management.pdf
6 Best AI Tools for Contract Management.pdf
Anadea
Coreldraw 2021 Crack Latest Version 2025
Coreldraw 2021 Crack Latest Version 2025Coreldraw 2021 Crack Latest Version 2025
Coreldraw 2021 Crack Latest Version 2025
farooq048kp
Distributed systems: design, principles and experiencies
Distributed systems: design, principles and experienciesDistributed systems: design, principles and experiencies
Distributed systems: design, principles and experiencies
Andr辿s P辿rez Gil
Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025
mohsinrazakpa28
Internet Download Manager (IDM) Crack + Lisence key Latest version 2025
Internet Download Manager (IDM) Crack + Lisence key Latest version 2025Internet Download Manager (IDM) Crack + Lisence key Latest version 2025
Internet Download Manager (IDM) Crack + Lisence key Latest version 2025
blouch36kp
Maximizing PMI Chapter Success to Streamline Events + Programs with OnePlan
Maximizing PMI Chapter Success to Streamline Events + Programs with OnePlanMaximizing PMI Chapter Success to Streamline Events + Programs with OnePlan
Maximizing PMI Chapter Success to Streamline Events + Programs with OnePlan
OnePlan Solutions
Byteexpo Call Center - Presentation.pptx
Byteexpo Call Center - Presentation.pptxByteexpo Call Center - Presentation.pptx
Byteexpo Call Center - Presentation.pptx
hmk11790
Will Ai Eat the Industrial World? The End of Engineering as We Know it
Will Ai Eat the Industrial World? The End of Engineering as We Know itWill Ai Eat the Industrial World? The End of Engineering as We Know it
Will Ai Eat the Industrial World? The End of Engineering as We Know it
Christian Dahlen
Movavi Screen Recorder Studio 2025 crack Free Download
Movavi Screen Recorder Studio 2025 crack Free DownloadMovavi Screen Recorder Studio 2025 crack Free Download
Movavi Screen Recorder Studio 2025 crack Free Download
imran03kr
TVersity Pro Media Server Free CRACK Download
TVersity Pro Media Server Free CRACK DownloadTVersity Pro Media Server Free CRACK Download
TVersity Pro Media Server Free CRACK Download
mohsinrazakpa43
Lecture2_REQUIREMENT_Process__Modelss.pptx
Lecture2_REQUIREMENT_Process__Modelss.pptxLecture2_REQUIREMENT_Process__Modelss.pptx
Lecture2_REQUIREMENT_Process__Modelss.pptx
Aqsa162589
Microsoft Office Crack 2019 Free Download
Microsoft Office Crack 2019 Free DownloadMicrosoft Office Crack 2019 Free Download
Microsoft Office Crack 2019 Free Download
tayab01kp
IObit Driver Booster Free 12.3.0.557 Free Download
IObit Driver Booster Free 12.3.0.557 Free DownloadIObit Driver Booster Free 12.3.0.557 Free Download
IObit Driver Booster Free 12.3.0.557 Free Download
blouch33kp
Adobe XD Crack Version 2025 Free Download
Adobe XD Crack Version 2025 Free DownloadAdobe XD Crack Version 2025 Free Download
Adobe XD Crack Version 2025 Free Download
mohsinrazakpa67
Wondershare Filmora Crack 2025 For Windows Free
Wondershare Filmora Crack 2025 For Windows FreeWondershare Filmora Crack 2025 For Windows Free
Wondershare Filmora Crack 2025 For Windows Free
mohsinrazakpa43
Adobe Illustrator Crack Download (Latest 2025)
Adobe Illustrator Crack Download (Latest 2025)Adobe Illustrator Crack Download (Latest 2025)
Adobe Illustrator Crack Download (Latest 2025)
blouch36kp
The Evolution of Microsoft Project Portfolio Management
The Evolution of Microsoft Project Portfolio ManagementThe Evolution of Microsoft Project Portfolio Management
The Evolution of Microsoft Project Portfolio Management
OnePlan Solutions
mORMot 2 - Pascal Cafe 2025 in Nederlands
mORMot 2 - Pascal Cafe 2025 in NederlandsmORMot 2 - Pascal Cafe 2025 in Nederlands
mORMot 2 - Pascal Cafe 2025 in Nederlands
Arnaud Bouchez
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with EaseCypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Shubham Joshi
Rights, Copyrights, and Licences for Software Engineering Research v1.0
Rights, Copyrights, and Licences for Software Engineering Research v1.0Rights, Copyrights, and Licences for Software Engineering Research v1.0
Rights, Copyrights, and Licences for Software Engineering Research v1.0
Yann-Ga谷l Gu辿h辿neuc
6 Best AI Tools for Contract Management.pdf
6 Best AI Tools for Contract Management.pdf6 Best AI Tools for Contract Management.pdf
6 Best AI Tools for Contract Management.pdf
Anadea
Coreldraw 2021 Crack Latest Version 2025
Coreldraw 2021 Crack Latest Version 2025Coreldraw 2021 Crack Latest Version 2025
Coreldraw 2021 Crack Latest Version 2025
farooq048kp
Distributed systems: design, principles and experiencies
Distributed systems: design, principles and experienciesDistributed systems: design, principles and experiencies
Distributed systems: design, principles and experiencies
Andr辿s P辿rez Gil
Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025
mohsinrazakpa28
Internet Download Manager (IDM) Crack + Lisence key Latest version 2025
Internet Download Manager (IDM) Crack + Lisence key Latest version 2025Internet Download Manager (IDM) Crack + Lisence key Latest version 2025
Internet Download Manager (IDM) Crack + Lisence key Latest version 2025
blouch36kp
Maximizing PMI Chapter Success to Streamline Events + Programs with OnePlan
Maximizing PMI Chapter Success to Streamline Events + Programs with OnePlanMaximizing PMI Chapter Success to Streamline Events + Programs with OnePlan
Maximizing PMI Chapter Success to Streamline Events + Programs with OnePlan
OnePlan Solutions

Functional programmning

  • 1. Functional Programming As simple as it could be By: Ayat Khraisat
  • 2. What we are going to discuss? We are not going to discuss code. Whats pure function is? First class citizens, higher order functions. Referentially Transparent. Functional, Imperative or Reactive. Functional benefits.
  • 3. We are not talking about something new
  • 4. Pure Functions You are not pure if you changes with time. You are not pure if you changes you answer. You are not pure if you mutate the system state or any side effects. You not pure if you depends on global state.
  • 5. Change state produces Bugs So Use constants as much as you can. No statements just expressions. Also as much as you can No void functions.
  • 6. Higher Order Functions a function that takes function or returns
  • 7. Function is considered First Class Citizen if it can assigned to variables or stored in data structures and and sent/returned from other one.
  • 8. Referentially transparent There are many ways to REFERENCE that thing. You should read transparent to mean doesnt make a difference A function Referentially transparent is call to this method may be replaced by its return value X= 5+(1+3) or X= 5+4 or X=9
  • 9. Functional does not mean Reactive
  • 10. Functional programming does not conflict with OOP
  • 11. Why Should we change?
  • 12. 1. No Asking whats is the state? Easier Debugging 2. Simpler Easier and more Cleaner. 3. less NPE. 4. Less change state errors. 5. Less Interfaces and delegates. 6. Reusability. 7. You will find more when you start using it. Functional Programming Benefits
  • 13. No program can be functional forever At some point, it needs to be imperative and spell out to the computer exactly how to do something, and it needs to modify state (whether that is updating a View, writing to the server, or just printing to console)
  • 14. What do you think, should we change?

Editor's Notes

  • #4: Functional programming was invented in 1957 before OO and structured. But memory was too expensive to make it practical. Memory is cheap now. https://www.youtube.com/watch?v=7Zlp9rKHGD4
  • #5: https://www.youtube.com/watch?v=7Zlp9rKHGD4
  • #6: There is no void in Kotlin Statements vs Expression https://blog.kotlin-academy.com/kotlin-programmer-dictionary-statement-vs-expression-e6743ba1aaa0
  • #7: Not All languages support Higher order functions, Swift, Kotlin do!
  • #14: Excerpt From: Christopher Arriola. Reactive Programming on Android with RxJava