Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Functional Programming Principles
Search
Alfin S.
December 22, 2023
55
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Functional Programming Principles
Talk about core principles of functional programming
Alfin S.
December 22, 2023
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Building AI with AI
inesmontani
PRO
1
1.3k
Automating Front-end Workflow
addyosmani
1369
210k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Balancing Empowerment & Direction
lara
6
1.3k
Leo the Paperboy
mayatellez
10
2.4k
Transcript
Functional λ programming-principles Alfin Surya (@natserract)
Outline Introduction What is functional programming? Imperative vs Functional FP
Characteristics
What’s up! Hello! I’m Alfin I write JavaScript, Python, Elixir
FP enthusiast I also like to study AI & machine learning
Functional Programming?
Function Composition
imperative vs λ
imperative functional
Think Different(ly) They must be very small They must do
one thing only (single responsibility principle) They must have few arguments as possible (rules of three) They should not have side effects They should avoid flag arguments that create two internal paths in a function
FP Characteristics First-Class Functions Statelessness and Immutability Pure Functions Higher-Order
Functions
First-Class Functions Functions are treated as first-class citizens, meaning they
can be assigned to variables, passed as arguments, or returned from other functions.
Statelessness and Immutability Line 2: Attempt to assign to const
or readonly variable
Pure Function ✅ Deterministic ✅ No Side Effects
Impure function ❌ Deterministic ❌ No Side Effects
Higher Order Function
Advantages Modularity Testability Scalability Readability
Slides & More https://speakerdeck.com/natserract https://medium.com/@natserract https://github.com/natserract
Thanks! Alfin Surya (@natserract)