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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Alfin S.
December 22, 2023
1
41
Functional Programming Principles
Talk about core principles of functional programming
Alfin S.
December 22, 2023
Tweet
Share
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.8k
How to make the Groovebox
asonas
2
1.9k
Facilitating Awesome Meetings
lara
57
6.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
ラッコキーワード サービス紹介資料
rakko
1
2.1M
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
400
Deep Space Network (abreviated)
tonyrice
0
36
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
200
What's in a price? How to price your products and services
michaelherold
247
13k
The SEO Collaboration Effect
kristinabergwall1
0
340
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)