SlideShare a Scribd company logo
Everyday Functional
Programming in
JavaScript
Leo Hernandez
@leojh
About Me
● From South Florida
● Been developing since 2004
● Started out in .Net but now mostly JavaScript
● Really excited about JavaScript world and
newer ways of doing the same thing
@leojh
WHY?
@leojh
In Functional Programming
code is built by using
Functions as atomic units
@leojh
Functions are good atomic
units because they have a
known input -> output lifecycle
@leojh
Unlike Objects, they tend to be
simple and have no side
effects
@leojh
const square = x => x^2
@leojh
In Functional Programming,
data is supposed to be
immutable
@leojh
Data Immutability helps with
keeping things simple and with
parallel processing
@leojh
Part of the goal is to make the
code declarative so it’s easier
to read since it conveys
intention
@leojh
const myBestCustomers = customers =>
customersWhoBuyATonFromMe(customers)
.and
.giveMeGoodReviewsOnYelp(customers)
@leojh
You’re probably already
working in FP and may not
realize it
@leojh
If you’re using React, you’re
basically using a plain JS
Function to render things on a
screen
@leojh
const ArticleTitle = title =>
<h3>{title}</h3>
@leojh
Let’s do some live coding
@leojh
Concepts During Live Coding
● Unit Testing
● Refactoring
● Function Composition
● Curry
● Data Immutability and transformation /
projections
● ES6+
@leojh
COMPOSE
VS
PIPE
@leojh
Use Spread Operators
@leojh
Before you write any
traditional loop, ask yourself
why?
You should probably use a
High Order Function instead
@leojh
THANK YOU!
@leojh

More Related Content

PDF
Everyday Functional Programming in JavaScript
PPTX
Clean code
PDF
Your first 5 PHP design patterns - ThatConference 2012
PDF
Enterprise PHP: mappers, models and services
PDF
[ACL2017読み会] What do Neural Machine Translation Models Learn about Morphology?
PPTX
Treating test code as production code
ODP
CLEAN CODE
PDF
Common design patterns in php
Everyday Functional Programming in JavaScript
Clean code
Your first 5 PHP design patterns - ThatConference 2012
Enterprise PHP: mappers, models and services
[ACL2017読み会] What do Neural Machine Translation Models Learn about Morphology?
Treating test code as production code
CLEAN CODE
Common design patterns in php

Similar to Everyday Functional Programming in JavaScript (20)

PDF
379008-rc217-functionalprogramming
PPTX
Declarative JavaScript concepts and implemetation
PPTX
Functionnal programming
PPTX
Introduction to functional programming with JavaScript
PPTX
An Introduction to Functional Programming with Javascript
PPTX
Functional Programming in Javascript - IL Tech Talks week
PDF
Functional Programming with JavaScript
ODP
Functional programming
PDF
Functional Programming with Javascript
PDF
Functional programing in Javascript (lite intro)
PDF
Introduction to Functional Programming (w/ JS)
PPTX
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD?
PDF
Christian Gill ''Functional programming for the people''
PPTX
When life gives you functions make functional programs!
PPTX
Functional Programming in JavaScript by Luis Atencio
PPTX
Why Functional Programming So Hard?
PDF
Functional Programming: An Introduction
PDF
Functional Programming
PPTX
Functional programming for the Advanced Beginner
PDF
Functional JavaScript Fundamentals
379008-rc217-functionalprogramming
Declarative JavaScript concepts and implemetation
Functionnal programming
Introduction to functional programming with JavaScript
An Introduction to Functional Programming with Javascript
Functional Programming in Javascript - IL Tech Talks week
Functional Programming with JavaScript
Functional programming
Functional Programming with Javascript
Functional programing in Javascript (lite intro)
Introduction to Functional Programming (w/ JS)
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD?
Christian Gill ''Functional programming for the people''
When life gives you functions make functional programs!
Functional Programming in JavaScript by Luis Atencio
Why Functional Programming So Hard?
Functional Programming: An Introduction
Functional Programming
Functional programming for the Advanced Beginner
Functional JavaScript Fundamentals
Ad

More from Leo Hernandez (11)

PDF
Binary Addition
PDF
Binary Concepts Review
PDF
Character Sets
PDF
Octal and Hexadecimal Numbering Systems
PDF
Programming Paradigms
PDF
ES6 - Make JavaScript Great for the First Time
PDF
Developing Single Page Apps with Ember.js
PDF
JavaScript Essentials for Ember development
PPTX
Tech 101 @ delray tech spaces
PDF
JavaScript ES6
PDF
Intro to ember.js
Binary Addition
Binary Concepts Review
Character Sets
Octal and Hexadecimal Numbering Systems
Programming Paradigms
ES6 - Make JavaScript Great for the First Time
Developing Single Page Apps with Ember.js
JavaScript Essentials for Ember development
Tech 101 @ delray tech spaces
JavaScript ES6
Intro to ember.js
Ad

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Spectroscopy.pptx food analysis technology
PDF
Machine learning based COVID-19 study performance prediction
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Electronic commerce courselecture one. Pdf
Network Security Unit 5.pdf for BCA BBA.
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Empathic Computing: Creating Shared Understanding
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
sap open course for s4hana steps from ECC to s4
Spectroscopy.pptx food analysis technology
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Electronic commerce courselecture one. Pdf

Everyday Functional Programming in JavaScript