Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Functional Programming Principles
Search
Alfin S.
December 22, 2023
48
1
Share
Functional Programming Principles
Talk about core principles of functional programming
Alfin S.
December 22, 2023
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Building Applications with DynamoDB
mza
96
7.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
A Soul's Torment
seathinner
6
2.8k
WCS-LA-2024
lcolladotor
0
610
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
290
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
540
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.8k
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)