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
42
Functional Programming Principles
Talk about core principles of functional programming
Alfin S.
December 22, 2023
Tweet
Share
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
GitHub's CSS Performance
jonrohan
1032
470k
How to make the Groovebox
asonas
2
2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
350
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
440
Six Lessons from altMBA
skipperchong
29
4.2k
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)