SlideShare a Scribd company logo
Functional Patterns
for the non-mathematician
add(4, 2)
//=> 6
// associative
add(add(1, 2), 4) == add(1, add(2, 4))
// commutative
add(4, 1) == add(1, 4)
// identity
add(n, 0) == n
// distributive
multiply(2, add(3,4)) == add(multiply(2, 3), multiply(2, 4))
add(4.4, 2.2)
//=> 6.6

Recommended for you

Scala Parallel Collections
Scala Parallel CollectionsScala Parallel Collections
Scala Parallel Collections

Introduction to the Parallel Collection framework for data-parallel programming in Scala (from ScalaDays 2011).

scalaparallelismdata-parallel
Scala by Luc Duponcheel
Scala by Luc DuponcheelScala by Luc Duponcheel
Scala by Luc Duponcheel

Scala is a multi-paradigm programming language that supports functional, object-oriented and imperative programming paradigms. The document discusses Scala's support for types, expressions, objects, functions, and provides examples of using Scala for expressions, functions, control structures, patterns, spaces and actors.

bejugscala
Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014

Помните легендарные Java Puzzlers? Да-да, те самые, с Джошом Блохом и Нилом Гафтером? Ну, по которым ещё книжку написали? Так вот, в Groovy всё ещё веселее. В смысле — задачки ещё более странные, и ответы ещё более поразительные. Этот доклад для вас, Groovy-разработчики, мы покажем вам настоящие, большие и красивые подводные камни! И для вас, Java-разработчики, потому что таких вещей на Java-подобном синтакисе вы точно никогда не видели! И для вас, PHP-разработчики… хотя, нет, не для вас :) Всем точно будет весело — ваши ведущие Женя и Барух будут зажигать, шутить, спорить, бросаться футболками в публику, и самое главное — заставят вас офигевать от Groovy.

groovygroovypuzzlersjokerconf
var inc = new Increaser(4);
inc.increaseBy(2);
inc.value();
// 6
Interfaces
Properties/Laws
Polymorphic
Composable
Currying
var reverseCap = compose(capitalize, reverse)
reverseCap(“hello”)
//=> “Olleh”
Composition

Recommended for you

Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 redux

An updated version of my talk on virtual machine cores comparing techniques in C and Go for implementing dispatch loops, stacks & hash maps. Lots of tested and debugged code is provided as well as references to some useful/interesting books.

golab2018golangvirtual machines
하스켈 프로그래밍 입문 4
하스켈 프로그래밍 입문 4하스켈 프로그래밍 입문 4
하스켈 프로그래밍 입문 4

This document discusses Functor, Applicative Functor, Foldable and Traversable type classes in Haskell. It provides examples of using fmap, pure, (<*>), foldMap, traverse and sequenceA for different types like Maybe, lists and IO. It shows how Foldable is about folding while Traversable allows transforming elements of a structure with an Applicative. Traverse is used to define sequenceA and allows rejecting elements with negatives from a list.

하스켈
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...

Contact FUNCTIONAL PROGRAMING AND EVENT SOURCING - A PAIR MADE IN HEAVEN - EXTENDED, 2 HOURS LONG BRAINWASH TL;DR: This is talk is a solid introduction to two (supposedly) different topics: FP & ES. I will cover both the theory and the practice. We will emerage ES+FP application starting from ES+OO one. While reading blogs or attending conferences, you might have heard about Event Sourcing. But didn't you get this feeling, that while there is a lot of theory out there, it is really hard to see a hands-on example? And even if you find some, those are always orbiting around Object Oriented concepts? Greg Young once said "When we talk about Event Sourcing, current state is a left-fold of previous behaviours. Nothing new to Functional Programmers". If Functional Programming is such a natural concept for event sourced systems, shouldn't they fit together on a single codebase? In this talk we will quickly introduce Event Sourcing (but without going into details), we will introduce some functional concepts as well (like State monad). Armoured with that knowledge we will try to transform sample ES application (OO-style, tightly coupled with framework) to frameworkless, FP-style solution). Talk is targeted for beginner and intermediate audience. Examples will be in Scala but nothing fancy - normal syntax. This talk is an extended version of a presentation "Event Sourcing & Functional Programming - a pair made in heaven". It is enriched with content of presentations: "Monads - asking the right question" and "It's all been done before - The Hitchhiker's Guide to Time Travel".

#jdd2015#java
var reverseCap = compose(capitalize, reverse)
reverseCap(“hello”)
//=> “Olleh”
Composition
var reverseCap = compose(capitalize, reverse)(“hello”)
//=> “Olleh”
Composition
“hello”“olleh”“Olleh”
compose(compose(f, g), h) == compose(f, compose(g, h))
Composition
(associativity)
compose(f, g, h)
Composition
(associativity)

Recommended for you

Functional programming in scala
Functional programming in scalaFunctional programming in scala
Functional programming in scala

The document discusses functional programming concepts in Scala including pure functions, referential transparency, algebraic data types, immutable linked lists, list folding, option types, higher order functions, and random number generation. It provides code examples for implementing immutable linked lists with pattern matching, list folding with foldLeft and foldRight, mapping, filtering and flatMapping lists, and defining monads and functors in Scala.

Stanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with SwiftStanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with Swift

This time Alexander Voronov (@aleks_voronov), iOS Developer at Stanfy talked about Functional Programming 101 with Swift Key points: - Why do we need Functional Programming? - The power of Swift - Functors, Applicatives and Monads - Pipes & Railways - Functional Swift in real life Links Mentioned: - Functors, Applicatives and Monads in Pictures: http://adit.io/posts/2013-04-17-funct... - Railway Oriented Programming: http://fsharpforfunandprofit.com/post... - Functional Programming in Swift (Objc.io): http://www.objc.io/books/fpinswift/ - Moya: https://github.com/Moya/Moya - Argo: https://github.com/thoughtbot/Argo - Swiftz: https://github.com/typelift/Swiftz - RxSwift: https://github.com/ReactiveX/RxSwift - ReactiveCocoa-3.0: https://github.com/ReactiveCocoa/Reac... - Haskell: https://www.haskell.org - F#: http://fsharp.org - Erlang: http://www.erlang.org - Elm: http://elm-lang.org Watch video from the presentation (rus): https://youtu.be/w6zyGylS4Wk Join our MadCode group on FB(rus): https://www.facebook.com/MadCodeMeetup/ Find more videos from MadCode Meetups (rus): https://www.youtube.com/playlist?list=PLrplqd3YJvBvUygFkx4Xvx1p3zyiCgB9Q

functional programmingmonadshaskell
The Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 SeasonsThe Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 Seasons

Two hours of the Groovy Puzzlers as were presented at Groovy and Grails Austin Meetup! The video: https://www.youtube.com/watch?v=9qa1seKaRCU

groovygroovypuzzlers
var i = compose(g, h)
compose(f, i)
Composition
(associativity)
var getFromDb = compose(pluck('rows'), User.findAll)
var cleanUpData = compose(capitalize, pluck('name'))
var renderTemplate = TemplateEngine.render(‘users_table')
var makePage = compose(renderTemplate, map(cleanUpData), getFromDb)
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
var getFromDb = compose(pluck('rows'), User.findAll)
var cleanUpData = compose(capitalize, pluck('name'))
var renderTemplate = TemplateEngine.render(‘users_table')
var makePage = compose(renderTemplate, map(cleanUpData), getFromDb)
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
makePage({limit: 20})
Perfect world
Functional Patterns for the non-mathematician

Recommended for you

Kotlin class
Kotlin classKotlin class
Kotlin class

The document provides examples of Kotlin classes and properties compared to Java classes. Some key points summarized: 1. Kotlin classes can define properties directly rather than private fields with getters/setters like in Java. Properties are accessed directly rather than through getter methods. 2. Data classes provide equals(), hashCode(), toString() by default and allow destructuring declarations. Regular classes do not have these features by default. 3. Default values can be defined for properties in Kotlin classes, unlike Java where default values require a builder pattern.

oepnfunfunstudykotlin
Java 8 Puzzlers [as presented at OSCON 2016]
Java 8 Puzzlers [as presented at  OSCON 2016]Java 8 Puzzlers [as presented at  OSCON 2016]
Java 8 Puzzlers [as presented at OSCON 2016]

We aren't sure about you, but working with Java 8 made one of the speakers lose all of his hair and the other lose his sleep (or was it the jetlag?). If you still haven't reached the level of Brian Goetz in mastering lambdas and strings, this talk is for you. And if you think you have, we have some bad news for you, you should attend as well.

java8java
Transducers in JavaScript
Transducers in JavaScriptTransducers in JavaScript
Transducers in JavaScript

JavaScript is becoming more functional nowadays. map and filter - those words mean a lot for modern programming world. Some people think that those are just Array.prototype methods. But Bacon.js also implements map and filter algorithms in their codebase, as well as RxJS. Immutable.js and lazy collections from lodash library do have their own implementations of these algorithms. Transducers is an attempt to describe and implement the essence of these (and lots of other) algorithms, ignoring the context which they are applied to - arrays, lazy collections, event streams or queues/channels.

javascripttransducers
function (property, x) {
return x[property];
}
Getters/Setters
function (property, value, x) {
x[property] = value;
return x;
}
Lenses
over(l, f, x)
view(l, x)
set(l, y, x)
var user = {id: 1, name: ‘Alicia'}
var L = makeLenses([‘name’])
view(L.name, user) // 'Alicia'
set(L.name, 'Ally', user) // {id: 1, name: 'Ally'}
over(L.name, toUpperCase, user) // {id: 1, name: 'ALICIA'}
Lenses
var user = {id: 1, name: {first: ‘doris’, last: ‘day’ }}
var L = makeLenses([‘name’, ‘first’])
var firstNameChar = compose(L.name, L.first, _1)
over(firstNameChar, toUpperCase, user)
//=> {id: 1, name: {first: ‘Doris’, last: ‘day’ }}
Lenses

Recommended for you

Scala collections
Scala collectionsScala collections
Scala collections

Scala collections provide a uniform approach to working with data structures. They are generic, immutable, and support higher-order functions like map and filter. The core abstractions are Traversable and Iterable, with subclasses including lists, sets, and maps. Collections aim to be object-oriented, persistent, and follow principles like the uniform return type. They allow fluent, expressive ways to transform, query, and manipulate data in a functional style.

scala
imager package in R and examples..
imager package in R and examples..imager package in R and examples..
imager package in R and examples..

imager package in R and example References: http://dahtah.github.io/imager/ http://dahtah.github.io/imager/imager.html https://cran.r-project.org/web/packages/imager/imager.pdf

r graphicsr data visualizationvolkan oban
Scala. Introduction to FP. Monads
Scala. Introduction to FP. MonadsScala. Introduction to FP. Monads
Scala. Introduction to FP. Monads

This presentation takes you on a functional programming journey, it starts from basic Scala programming language design concepts and leads to a concept of Monads, how some of them designed in Scala and what is the purpose of them

fpmonadsscala
view(l, set(l, b, a)) == b
set(l, view(l, a), a) == a
set(l, c, set(l, b, a)) == set(l, c, a)
Lens laws
Functional Patterns for the non-mathematician
if(x !== null && x !== undefined) {
return f(x)
}
Null checking
fmap(f, Maybe(x))
Null checking

Recommended for you

Functional programming from its fundamentals
Functional programming from its fundamentalsFunctional programming from its fundamentals
Functional programming from its fundamentals

Functional programming is usually classified as difficult. The jargon sounds scary and is creating a barrier to newcomers. This is a shame, since in the essence I would argue that functional programming is easier than object-oriented programming. In this talk, I’ll outline the fundamentals of functional programming and we will take a look at some common constructs from the perspective of the foundations. Hopefully in the end you will walk away with your toes dipped into the world of functional programming wanting to know more. This talk is aimed for the object-oriented programmer. No prior knowledge about FP is required.

fpfunctional programmingcomposition
2.3 implicits
2.3 implicits2.3 implicits
2.3 implicits

The document discusses implicit conversions in Scala. It shows an example of implicitly converting a String to a RichString to call the reverse method. It then explains how an implicit conversion is defined to perform this conversion. It also discusses other implicit conversions defined in the Predef object, such as converting types to their wrapper classes. Finally, it summarizes the rules for how and when implicit conversions are inserted in Scala.

Js for learning
Js for learningJs for learning
Js for learning

Quick talk on why js is good for learning and some gotchas. Probably doesn't translate well w/o narrative & live code doe

javascriptfunctional programminglearning
var fmap = function(f, mappable) {
return mappable.map(f)
}
Null checking
fmap(function(x) { return x.toUpperCase() }, Maybe(‘hi’))
//=> Maybe(‘HI’)
fmap(function(x) { return toUpperCase(x); }, Maybe(null))
//=> Maybe(null)
Null checking
fmap(function(x) { return x.toUpperCase() }, Maybe(‘hi’))
//=> Maybe(‘HI’)
fmap(function(x) { return x.toUpperCase() }, Maybe(null))
//=> Maybe(null)
Null checking
compose(fmap(f), Maybe)
Null checking

Recommended for you

Liftin every day
Liftin every dayLiftin every day
Liftin every day

This document discusses applicative functors in Haskell. It introduces the pure and ap functions that are used to define an applicative functor. It also discusses how applicative functors are closed under composition and how liftA and liftA2 can be defined in terms of fmap. It provides examples of using applicative functors with lists and discusses eventual results like combinators, comprehensions, and parallel computations.

javascript haskell pointfree applicative functor t
Underscore
UnderscoreUnderscore
Underscore

The document discusses issues with using Underscore.js for functional programming concepts like currying, composition, and functors. Specifically, it notes that Underscore's API prevents currying functions and extending the map method, promoting chain over composition. The document suggests using Wu.js instead for a more functional approach.

haskelljavascriptunderscore
Lenses
LensesLenses
Lenses

This document discusses lenses and their uses. Lenses allow both getting and setting values in an object. They are defined as functions that take a function and object as arguments and return a modified object. Lenses can be composed to access nested values. Examples show defining lenses to access properties, modify values using lenses, and compose lenses to access nested properties.

functional programminglensesfunctor
var id = function(x) { return x; }
fmap(id, x) == id(x)
Fmap laws
(identity)
compose(fmap(f), fmap(g)) == fmap(compose(f, g))
Fmap laws
(composition)
Functional Patterns for the non-mathematician
if(x !== null && x !== undefined) {
return f(x)
} else {
throw ‘Some Error!’
}
Error Handling

Recommended for you

Ricky Bobby's World
Ricky Bobby's WorldRicky Bobby's World
Ricky Bobby's World

This document discusses techniques for improving JavaScript performance, including: - Using for loops instead of foreach loops for improved speed when iterating over arrays - Memoization to cache function results and avoid repeated computations - Lazy evaluation with libraries like underscore.js to defer computation until results are needed - Parallelization using functional programming techniques like liftA3 to run operations concurrently - Compile-time optimizations like loop fusion that rearrange code to reduce operations The document emphasizes that functional programming allows optimizations like these through composability and avoiding side effects.

javascriptfunctional programmingperformance
Functional js class
Functional js classFunctional js class
Functional js class

This document covers key concepts in functional JavaScript including: 1) First class functions, loops, purity, type signatures, partial application, and composition. 2) It discusses the differences between imperative vs declarative programming and defines pure functions. 3) Various exercises are presented to reinforce these functional programming concepts.

haskellfppoint-free
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP

This document provides examples of functional JavaScript code using point-free style and typeclasses. It includes code snippets demonstrating: - Composing functions using point-free style to remove unnecessary variables - Implementing common typeclass methods like map, chain, and ap for a Container type - Deriving typeclass instances for custom types to gain functionality like Functor, Applicative, Foldable - Using typeclasses to compose functions operating on different container types in a uniform way The document provides code samples but does not explain concepts in detail. It focuses on demonstrating point-free code and typeclass patterns through examples rather than performing in-depth explanations or performance analysis. Questions are provided at the end to prompt

javascriptfunctional programmingjavascript haskell pointfree applicative functor t
Error Handling
fmap(f, Either(‘Some error’, x))
Either(‘need an int’, 3)
//=> Right(3)
fmap(function(x) { return x + 1; }, Either(‘need an int’, undefined))
//=> Left(‘need an int’)
Error Handling
Either(‘need an int’, 3)
//=> Right(3)
Either(‘need an int’, undefined))
//=> Left(‘need an int’)
Error Handling
fmap(function(x) { return x + 1; }, Right(2))
//=> Right(3)
fmap(function(x) { return x + 1; }, Either(‘need an int’, undefined))
//=> Left(‘need an int’)
Error Handling

Recommended for you

Functional Reactive Programming in Javascript
Functional Reactive Programming in JavascriptFunctional Reactive Programming in Javascript
Functional Reactive Programming in Javascript

Lightning is a giant discharge of electricity that can reach over five miles in length and raise air temperatures to 50,000 degrees Fahrenheit. On average, over 100 lightning bolts strike the Earth every second. Lightning is not confined to thunderstorms and has been seen in volcanic eruptions, forest fires, nuclear explosions, and heavy snowstorms.

bacon.jsfrpflapjax
Quality control in the knitting process
Quality control in the knitting processQuality control in the knitting process
Quality control in the knitting process

This document discusses quality control in the knitting process. It describes how effective quality control is important to reduce costs from defects, prevent customer dissatisfaction, and maintain quality. Several factors that can affect knitted fabric quality are discussed, including yarn properties, knitting machine parameters, process monitoring systems, and common fabric defects. Quality is maintained through controls on properties like loop length, tension, and defect detection.

knitting technology
Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)

Code examples demonstrating Functional Programming concepts, with JavaScript and Haskell. Part 1 can be found here - http://www.slideshare.net/calvinchengx/functional-programming-part01 Source code can be found here - http://github.com/calvinchengx/learnhaskell Let me know if you spot any errors! Thank you! :-)

functional programminghaskelljavascript
fmap(function(x) { return x + 1; }, Right(2))
//=> Right(3)
fmap(function(x) { return x + 1; }, Left(‘need an int’))
//=> Left(‘need an int’)
Error Handling
compose(fmap(f), Either(‘error’))
Error Handling
Functional Patterns for the non-mathematician
f(x, function(y) {
return g(y);
});
Future values

Recommended for you

Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02

The document provides an overview of JavaScript for PHP developers. It discusses similarities and differences between JavaScript and PHP syntax, including variables, arrays, conditionals, loops, functions, objects, prototypes, and more. It also summarizes the built-in JavaScript API, including global functions, constructors, and properties and methods of objects like Object, Array, Function, String, Number, Math, Date, and Error.

Functional programming with php7
Functional programming with php7Functional programming with php7
Functional programming with php7

This document discusses functional programming concepts in PHP 7 including lambda functions, closures, higher-order functions, currying, partial application, point-free style, and immutability. Examples are provided to demonstrate how these concepts can be applied to writing validation logic in a functional way using functions like pipe(), ifElse(), anyPass(), and has(). The talk encourages adopting a functional programming style for PHP code to write more reusable and composable functions.

From Javascript To Haskell
From Javascript To HaskellFrom Javascript To Haskell
From Javascript To Haskell

This document discusses JavaScript and Haskell. It provides code examples comparing features of the two languages such as functions, recursion, lists, and higher-order functions. It also discusses Haskell concepts like lazy evaluation, monads, and type inference.

Future values
fmap(f, Promise(x))
var p = new Promise();
fmap(function(x) { return log(reverse(x)) }, p)
//=> Promise()
p.resolve([1,2,3])
//=>[3, 2, 1]
Future values
Something that implements map
Functor
Functional Patterns for the non-mathematician

Recommended for you

Functional programming basics
Functional programming basicsFunctional programming basics
Functional programming basics

Referential Transparency, Higher Order functions, Lazy Evaluation, and Pattern Matching are key concepts in Functional Programming. Referential Transparency means that equal expressions can be replaced with each other without changing the program's behavior. Higher Order functions allow functions to be passed as arguments to other functions and returned as results. Lazy Evaluation delays evaluating arguments until their values are needed to avoid unnecessary computation. Pattern Matching allows decomposing and analyzing data structures.

functional programming
ECMAScript 6 new features
ECMAScript 6 new featuresECMAScript 6 new features
ECMAScript 6 new features

The document summarizes the key features of ECMAScript 6 (ES6), the 2015 version of JavaScript. Some of the major additions covered include let and const for block scoping, arrow functions, template strings, enhanced object properties, the spread operator, destructuring assignments, classes and inheritance, generators, and proxies. ES6 aims to make JavaScript a more robust and feature-rich programming language.

javascript development internet
"Немного о функциональном программирование в JavaScript" Алексей Коваленко
"Немного о функциональном программирование в JavaScript" Алексей Коваленко"Немного о функциональном программирование в JavaScript" Алексей Коваленко
"Немного о функциональном программирование в JavaScript" Алексей Коваленко

This document discusses functional programming concepts in JavaScript including imperative vs declarative programming, currying, composition, functors, and the Ramda library. It provides examples of implementing curried functions, function composition, and functors in JavaScript. Functors are discussed in the context of arrays and the Maybe datatype. The Ramda library is presented as an alternative to Underscore/Lodash that follows a more functional programming style with its use of currying and function composition.

frameworksjsjavascript
if(x !== null && x !== undefined) {
var y = f(x)
if(y !== null && y !== undefined) {
return g(y)
}
}
Nesting
f(x, function(y) {
return g(y, function(z) {
return h(z)
})
})
Nesting
compose(mjoin, fmap(f))
Nesting
var getField = compose(Maybe, document.querySelector)
var getValue = compose(Maybe, pluck(‘value’))
var greet = compose(fmap(fmap(concat(‘hello’))), fmap(getValue), getField)
greet(‘#name’)
//=> Maybe(Maybe(‘hello chris’))
var greet = compose(fmap(concat(‘hello’)), mjoin, fmap(getValue), getField)
greet(‘#name’)
//=> Maybe(‘hello chris’)
Nesting

Recommended for you

Short intro to ECMAScript
Short intro to ECMAScriptShort intro to ECMAScript
Short intro to ECMAScript

This document provides a short introduction to ECMAScript and highlights some key features of ECMAScript 5 including: strict mode which detects bad programming practices; new native JSON object for parsing and stringifying JSON; new methods added to the Array and Object prototypes like indexOf, map and freeze; and property descriptors which allow defining getter/setter methods for object properties.

javascripta-ot15ecmascript
EcmaScript 6
EcmaScript 6 EcmaScript 6
EcmaScript 6

This contains all the slides used in Silicon Valley Code Camp presentation on Sunday Oct 4, 10:45 session on "Amazing new features in JavaScript". At the end ut also includes the last year presentation covering ES 5

ecmascript programming functionaljavascript
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScript

The document discusses CoffeeScript, a programming language that compiles to JavaScript. It provides examples of CoffeeScript syntax for functions, conditionals, loops, classes, and other constructs. It explains how CoffeeScript aims to have less syntactic noise than JavaScript while remaining true to the underlying JavaScript semantics through compilation.

coffeescript
var getField = compose(Maybe, document.querySelector)
var getValue = compose(Maybe, pluck(‘value’))
var greet = compose(fmap(fmap(concat(‘hello’))), fmap(getValue), getField)
greet(‘#name’)
//=> Maybe(Maybe(‘hello chris’))
var greet = compose(fmap(concat(‘hello’)), mjoin, fmap(getValue), getField)
greet(‘#name’)
//=> Maybe(‘hello chris’)
Nesting
compose(mjoin, fmap(g), mjoin, fmap(f))
Nesting
mcompose(g, f)
compose(mjoin, fmap(g), mjoin, fmap(f))
Nesting
mcompose(g, f)
mcompose(mcompose(f, g), h) == mcompose(f, mcompose(g, h))
mcompose(f, M) == f
mcompose(M, f) == f
Monad laws

Recommended for you

TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction

Not so long ago Microsoft announced a new language trageting on front-end developers. Everybody's reaction was like: Why?!! Is it just Microsoft darting back to Google?! So, why a new language? JavaScript has its bad parts. Mostly you can avoid them or workaraund. You can emulate class-based OOP style, modules, scoping and even run-time typing. But that is doomed to be clumsy. That's not in the language design. Google has pointed out these flaws, provided a new language and failed. Will the story of TypeScript be any different?

typescript javascript ecmascript
Fat Arrow (ES6)
Fat Arrow (ES6)Fat Arrow (ES6)
Fat Arrow (ES6)

1. Arrow functions provide a concise syntax for defining anonymous functions and avoiding issues with binding 'this'. 2. They are best used for list processing and anonymous callback functions. 3. Arrow functions lexically bind 'this' from the enclosing context and cannot be used as constructors or contain yield expressions. 4. When a function requires a constructor, generator, changing 'this' binding, or needs arguments - a regular function expression is better.

functionarrowjavascript
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers

This document provides an overview of JavaScript for PHP developers. It compares the syntax and core concepts between the two languages. Some of the key points covered include: variables and data types are similar, functions are objects in JavaScript, JavaScript uses prototypes instead of classes, and functions provide scope. The document also summarizes the built-in global functions and properties, common methods for objects like Array and String, and emphasizes that constructor functions are often not needed in JavaScript.

phpconfoojavascript
Functional Patterns for the non-mathematician
Multiple null args
var notNull = function(x) {
return x !== null && x !== undefined
}
if(notNull(x) && notNull(y)) {
return f(x, y)
}
Multiple Async fn’s
var y,z;
f(x, function(result) {
y = result;
if(z) {
return h(y, z)
})
})
g(x, function(result) {
z = result;
if(y) {
return h(y, z)
})
})
liftA2(f, A(x), A(y))
Multiple values

Recommended for you

PHP Functions & Arrays
PHP Functions & ArraysPHP Functions & Arrays
PHP Functions & Arrays

This document discusses PHP functions and arrays. It covers basic syntax for defining functions, returning values from functions, and variable scope. It also covers array basics like indexing and printing arrays, as well as operations like sorting, searching, and iterating over arrays. Functions for stacks, queues and sets using arrays are also demonstrated. The document is a comprehensive reference for working with functions and arrays in PHP.

functionsphparrays
Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)

This document discusses Jscex, which allows writing asynchronous JavaScript code in a synchronous style using the $await operator. It provides examples of rewriting bubble sort to use asynchronous compare and swap functions. It also discusses using Jscex to handle parallelism, I/O, and concurrency in applications. Key benefits mentioned include just-in-time compilation for performance and ahead-of-time compilation for smaller file sizes.

jscexjavascriptasync
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters

This document introduces Gutscript, a new programming language designed for PHP developers that aims to address perceived issues with PHP syntax and semantics. Gutscript code compiles to PHP, allowing reuse of existing PHP libraries. It uses a simpler, more concise syntax inspired by languages like Ruby and Perl. The document provides examples comparing Gutscript and PHP code, demonstrating how Gutscript addresses issues like verbose function definitions, complex namespaces, and inconsistent syntax. It also discusses the Go-based implementation and opportunities for optimization of compiled Gutscript code.

liftA3(f, A(x), A(y), A(z))
Multiple values
liftA2(add, Maybe(3), Maybe(4))
//=> Maybe(7)
liftA2(add, Maybe(null), Maybe(4))
//=> Maybe(null)
Multiple values
liftA2(add, Maybe(3), Maybe(4))
//=> Maybe(7)
liftA2(add, Maybe(null), Maybe(4))
//=> Maybe(null)
Multiple values
var tweets_p = Http.get(‘/twitter/tweets’)
var photos_p = Http.get(‘/flickr/photos’)
var makeCollage = _.curry(function (tweets, photos){})
liftA2(makeCollage, tweets_p, photos_p)
Multiple values

Recommended for you

Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015

Here are the slides that I gave for The Arizona Software Community meetup. http://www.meetup.com/azsoftcom/events/222936544/ This was a gentle introduction to some of the features in EcmaScript 2015 and how and why you may use them.

javascriptes6ecmascript 2015
深入浅出Jscex
深入浅出Jscex深入浅出Jscex
深入浅出Jscex

This document discusses JavaScript Computation Expressions (Jscex), which allows writing asynchronous JavaScript code in a synchronous-looking style using computation expressions. Key points: - Jscex uses computation expressions to write asynchronous JavaScript code that looks synchronous using constructs like $await. - Asynchronous functions can be defined and composed together asynchronously and parallel using $await without callbacks or promises. - This allows asynchronous code to be written in a way that resembles synchronous code for readability while still maintaining asynchrony under the hood.

jscexjavascriptf#
JavaScript @ CTK
JavaScript @ CTKJavaScript @ CTK
JavaScript @ CTK

This document summarizes some key aspects of JavaScript including: - JavaScript's basic language features like functions, objects, and exceptions. - The good parts of JavaScript like first-class functions, object literals, closures, and prototyping which enable powerful programming patterns. - The bad parts like inconsistent cross-browser support, eval(), tricky truthiness rules, and missing declarations which can cause bugs. - That following good coding practices, using common sense, and static analysis can help address JavaScript's weaknesses.

programmingjavascript
// identity
ap(A(id), m) == m
// composition
ap(ap(ap(A(compose), f), g), w) == ap(f, ap(g, w))
// homomorphism
ap(A(f), A(x)) == A(f(x))
// interchange
ap(u, A(x)) == ap(A(function(f) { return f(x); }), u)
Applicative laws
Functional Patterns for the non-mathematician
Accumulation
reduce(function(acc, x) {
return acc + x;
}, 0, [1,2,3])
Accumulation
reduce(function(acc, x) {
return acc * x;
}, 1, [1,2,3])

Recommended for you

Generating Power with Yield
Generating Power with YieldGenerating Power with Yield
Generating Power with Yield

The document discusses generators and yield in PHP. It begins by explaining generators as a special routine that yields values during iteration to control loop behavior. Generators allow creating iterators without implementing complex iterator interfaces. Examples show how generators can iterate ranges efficiently, transform sequences, chain operations, and select values conditionally. The document also discusses using generators for asynchronous and non-blocking applications by yielding control back to an event loop.

phpyield
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx

Your comprehensive guide to RPA in healthcare for 2024. Explore the benefits, use cases, and emerging trends of robotic process automation. Understand the challenges and prepare for the future of healthcare automation

rpa in healthcarerpa in healthcare usarpa in healthcare industry
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM

Quantum Communications Q&A with Gemini LLM. These are based on Shannon's Noisy channel Theorem and offers how the classical theory applies to the quantum world.

quantum communicationsshannon's channel theoremclassical theory
Accumulation
reduce(function(acc, x) {
return acc || x;
}, false, [false, false, true])
Accumulation
reduce(function(acc, x) {
return acc && x;
}, true, [false, false, true])
Accumulation
reduce(function(acc, x) {
return acc > x ? acc : x;
}, 0, [12, 5, 35])
Monoid
mappend(m, m)
mempty(m)
mconcat([m])

Recommended for you

What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx

This is a slide deck that showcases the updates in Microsoft Copilot for May 2024

microsoftmicrosoft copilot
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers

The integration of programming into civil engineering is transforming the industry. We can design complex infrastructure projects and analyse large datasets. Imagine revolutionizing the way we build our cities and infrastructure, all by the power of coding. Programming skills are no longer just a bonus—they’re a game changer in this era. Technology is revolutionizing civil engineering by integrating advanced tools and techniques. Programming allows for the automation of repetitive tasks, enhancing the accuracy of designs, simulations, and analyses. With the advent of artificial intelligence and machine learning, engineers can now predict structural behaviors under various conditions, optimize material usage, and improve project planning.

programmingcodingcivil engineering
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL

Blockchain technology is transforming industries and reshaping the way we conduct business, manage data, and secure transactions. Whether you're new to blockchain or looking to deepen your knowledge, our guidebook, "Blockchain for Dummies", is your ultimate resource.

blockchainweb3blockchain technology
Monoid
mappend(m, m)
mempty(m)
mconcat([m])
mconcat([Sum(1), Sum(2), Sum(3)])
//=> Sum(6)
Accumulation
mconcat([Product(1), Product(2), Product(3)])
//=> Product(6)
Accumulation
mconcat([Max(13), Max(2), Max(9)])
//=> Max(13)
Accumulation

Recommended for you

Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure

Recent advancements in the NIST-JARVIS infrastructure: JARVIS-Overview, JARVIS-DFT, AtomGPT, ALIGNN, JARVIS-Leaderboard

jarvisjarvis-dftalignn
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024

Everything that I found interesting last month about the irresponsible use of machine intelligence

quantumfaxmachine
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges

accommodate the strengths, weaknesses, threats and opportunities of autonomous vehicles

automotive self-driving car technology
mconcat([Any(false), Any(false), Any(true)])
//=> Any(true)
Accumulation
mconcat([All(false), All(false), All(true)])
//=> All(false)
Accumulation
compose(mconcat, map(M))
Accumulation
// left identity
mappend(mempty, x) == x
// right identity
mappend(x, mempty) == x
// associativity
mappend(mappend(x, y), z) == mappend(x, mappend(y, z))
Monoid laws

Recommended for you

Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx

MuleSoft Meetup on APM and IDP

mulesoftai
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf

Support en anglais diffusé lors de l'événement 100% IA organisé dans les locaux parisiens d'Iguane Solutions, le mardi 2 juillet 2024 : - Présentation de notre plateforme IA plug and play : ses fonctionnalités avancées, telles que son interface utilisateur intuitive, son copilot puissant et des outils de monitoring performants. - REX client : Cyril Janssens, CTO d’ easybourse, partage son expérience d’utilisation de notre plateforme IA plug & play.

genaicloudrgpd
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter

Widya Salim and Victor Ma will outline the causal impact analysis, framework, and key learnings used to quantify the impact of reducing Twitter's network latency.

Functional Patterns for the non-mathematician
Combinators
function(x) {
return [f(x), g(x)]
}
Combinators
function(x, y) {
return [f(x), g(y)]
}
compose(f, g)
ampersand(f, g)
asterisk(f, g)
first(f)
second(f)
Arrows

Recommended for you

How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx

How do we build an IoT product, and make it profitable? Talk from the IoT meetup in March 2024. https://www.meetup.com/iot-sweden/events/299487375/

iot
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition

The DealBook is our annual overview of the Ukrainian tech investment industry. This edition comprehensively covers the full year 2023 and the first deals of 2024.

WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck

YOUR RELIABLE WEB DESIGN & DEVELOPMENT TEAM — FOR LASTING SUCCESS WPRiders is a web development company specialized in WordPress and WooCommerce websites and plugins for customers around the world. The company is headquartered in Bucharest, Romania, but our team members are located all over the world. Our customers are primarily from the US and Western Europe, but we have clients from Australia, Canada and other areas as well. Some facts about WPRiders and why we are one of the best firms around: More than 700 five-star reviews! You can check them here. 1500 WordPress projects delivered. We respond 80% faster than other firms! Data provided by Freshdesk. We’ve been in business since 2015. We are located in 7 countries and have 22 team members. With so many projects delivered, our team knows what works and what doesn’t when it comes to WordPress and WooCommerce. Our team members are: - highly experienced developers (employees & contractors with 5 -10+ years of experience), - great designers with an eye for UX/UI with 10+ years of experience - project managers with development background who speak both tech and non-tech - QA specialists - Conversion Rate Optimisation - CRO experts They are all working together to provide you with the best possible service. We are passionate about WordPress, and we love creating custom solutions that help our clients achieve their goals. At WPRiders, we are committed to building long-term relationships with our clients. We believe in accountability, in doing the right thing, as well as in transparency and open communication. You can read more about WPRiders on the About us page.

web development agencywpriderswordpress development
first(reverse)([‘Stan’, ‘Lee']) // [‘natS’, ‘Lee’]
second(reverse)([‘Stan’, ‘Lee']) // [‘Stan’, ‘eeL’]
ampersand(reverse, toUpperCase)(‘Stan’) // [‘natS’, ‘STAN’]
asterisk(reverse, toUpperCase)([‘Stan’, ‘Lee']) // [‘natS’, ‘LEE’]
Arrows
A(id) == id
A(compose(f, g)) == A(compose(f, A(g)))
first(A(f)) == A(first(f))
first(compose(f, g)) == compose(first(f), first(g))
compose(first(f), A(pluck(0))) == compose(A(pluck(0)), f)
compose(first(f), A(asterisk(id, g)) == compose(A(asterisk(id, g)), first(f))
compose(first(first(f)), A(assoc) == compose(A(assoc), first(f))
Arrow laws
Thanks!
@drboolean
https://github.com/DrBoolean/patterns_talk

More Related Content

What's hot

Kotlin standard
Kotlin standardKotlin standard
Kotlin standard
Myeongin Woo
 
하스켈 프로그래밍 입문 3
하스켈 프로그래밍 입문 3하스켈 프로그래밍 입문 3
하스켈 프로그래밍 입문 3
Kwang Yul Seo
 
Hitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional ProgrammingHitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional Programming
Sergey Shishkin
 
Scala Parallel Collections
Scala Parallel CollectionsScala Parallel Collections
Scala Parallel Collections
Aleksandar Prokopec
 
Scala by Luc Duponcheel
Scala by Luc DuponcheelScala by Luc Duponcheel
Scala by Luc Duponcheel
Stephan Janssen
 
Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014
Baruch Sadogursky
 
Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 redux
Eleanor McHugh
 
하스켈 프로그래밍 입문 4
하스켈 프로그래밍 입문 4하스켈 프로그래밍 입문 4
하스켈 프로그래밍 입문 4
Kwang Yul Seo
 
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
PROIDEA
 
Functional programming in scala
Functional programming in scalaFunctional programming in scala
Functional programming in scala
Siarhiej Siemianchuk
 
Stanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with SwiftStanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy
 
The Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 SeasonsThe Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 Seasons
Baruch Sadogursky
 
Kotlin class
Kotlin classKotlin class
Kotlin class
Myeongin Woo
 
Java 8 Puzzlers [as presented at OSCON 2016]
Java 8 Puzzlers [as presented at  OSCON 2016]Java 8 Puzzlers [as presented at  OSCON 2016]
Java 8 Puzzlers [as presented at OSCON 2016]
Baruch Sadogursky
 
Transducers in JavaScript
Transducers in JavaScriptTransducers in JavaScript
Transducers in JavaScript
Pavel Forkert
 
Scala collections
Scala collectionsScala collections
Scala collections
Inphina Technologies
 
imager package in R and examples..
imager package in R and examples..imager package in R and examples..
imager package in R and examples..
Dr. Volkan OBAN
 
Scala. Introduction to FP. Monads
Scala. Introduction to FP. MonadsScala. Introduction to FP. Monads
Scala. Introduction to FP. Monads
Kirill Kozlov
 
Functional programming from its fundamentals
Functional programming from its fundamentalsFunctional programming from its fundamentals
Functional programming from its fundamentals
Mauro Palsgraaf
 
2.3 implicits
2.3 implicits2.3 implicits
2.3 implicits
futurespective
 

What's hot (20)

Kotlin standard
Kotlin standardKotlin standard
Kotlin standard
 
하스켈 프로그래밍 입문 3
하스켈 프로그래밍 입문 3하스켈 프로그래밍 입문 3
하스켈 프로그래밍 입문 3
 
Hitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional ProgrammingHitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional Programming
 
Scala Parallel Collections
Scala Parallel CollectionsScala Parallel Collections
Scala Parallel Collections
 
Scala by Luc Duponcheel
Scala by Luc DuponcheelScala by Luc Duponcheel
Scala by Luc Duponcheel
 
Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014
 
Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 redux
 
하스켈 프로그래밍 입문 4
하스켈 프로그래밍 입문 4하스켈 프로그래밍 입문 4
하스켈 프로그래밍 입문 4
 
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
 
Functional programming in scala
Functional programming in scalaFunctional programming in scala
Functional programming in scala
 
Stanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with SwiftStanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with Swift
 
The Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 SeasonsThe Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 Seasons
 
Kotlin class
Kotlin classKotlin class
Kotlin class
 
Java 8 Puzzlers [as presented at OSCON 2016]
Java 8 Puzzlers [as presented at  OSCON 2016]Java 8 Puzzlers [as presented at  OSCON 2016]
Java 8 Puzzlers [as presented at OSCON 2016]
 
Transducers in JavaScript
Transducers in JavaScriptTransducers in JavaScript
Transducers in JavaScript
 
Scala collections
Scala collectionsScala collections
Scala collections
 
imager package in R and examples..
imager package in R and examples..imager package in R and examples..
imager package in R and examples..
 
Scala. Introduction to FP. Monads
Scala. Introduction to FP. MonadsScala. Introduction to FP. Monads
Scala. Introduction to FP. Monads
 
Functional programming from its fundamentals
Functional programming from its fundamentalsFunctional programming from its fundamentals
Functional programming from its fundamentals
 
2.3 implicits
2.3 implicits2.3 implicits
2.3 implicits
 

Viewers also liked

Js for learning
Js for learningJs for learning
Js for learning
Brian Lonsdorf
 
Liftin every day
Liftin every dayLiftin every day
Liftin every day
Brian Lonsdorf
 
Underscore
UnderscoreUnderscore
Underscore
Brian Lonsdorf
 
Lenses
LensesLenses
Ricky Bobby's World
Ricky Bobby's WorldRicky Bobby's World
Ricky Bobby's World
Brian Lonsdorf
 
Functional js class
Functional js classFunctional js class
Functional js class
Brian Lonsdorf
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
Brian Lonsdorf
 
Functional Reactive Programming in Javascript
Functional Reactive Programming in JavascriptFunctional Reactive Programming in Javascript
Functional Reactive Programming in Javascript
Brian Lonsdorf
 
Quality control in the knitting process
Quality control in the knitting processQuality control in the knitting process
Quality control in the knitting process
drskathirrvelu
 

Viewers also liked (9)

Js for learning
Js for learningJs for learning
Js for learning
 
Liftin every day
Liftin every dayLiftin every day
Liftin every day
 
Underscore
UnderscoreUnderscore
Underscore
 
Lenses
LensesLenses
Lenses
 
Ricky Bobby's World
Ricky Bobby's WorldRicky Bobby's World
Ricky Bobby's World
 
Functional js class
Functional js classFunctional js class
Functional js class
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
Functional Reactive Programming in Javascript
Functional Reactive Programming in JavascriptFunctional Reactive Programming in Javascript
Functional Reactive Programming in Javascript
 
Quality control in the knitting process
Quality control in the knitting processQuality control in the knitting process
Quality control in the knitting process
 

Similar to Functional Patterns for the non-mathematician

Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)
Calvin Cheng
 
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02
Seri Moth
 
Functional programming with php7
Functional programming with php7Functional programming with php7
Functional programming with php7
Sérgio Rafael Siqueira
 
From Javascript To Haskell
From Javascript To HaskellFrom Javascript To Haskell
From Javascript To Haskell
ujihisa
 
Functional programming basics
Functional programming basicsFunctional programming basics
Functional programming basics
openbala
 
ECMAScript 6 new features
ECMAScript 6 new featuresECMAScript 6 new features
ECMAScript 6 new features
GephenSG
 
"Немного о функциональном программирование в JavaScript" Алексей Коваленко
"Немного о функциональном программирование в JavaScript" Алексей Коваленко"Немного о функциональном программирование в JavaScript" Алексей Коваленко
"Немного о функциональном программирование в JavaScript" Алексей Коваленко
Fwdays
 
Short intro to ECMAScript
Short intro to ECMAScriptShort intro to ECMAScript
Short intro to ECMAScript
Jussi Pohjolainen
 
EcmaScript 6
EcmaScript 6 EcmaScript 6
EcmaScript 6
Manoj Kumar
 
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScript
niklal
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
Dmitry Sheiko
 
Fat Arrow (ES6)
Fat Arrow (ES6)Fat Arrow (ES6)
Fat Arrow (ES6)
Ryan Ewing
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
Stoyan Stefanov
 
PHP Functions & Arrays
PHP Functions & ArraysPHP Functions & Arrays
PHP Functions & Arrays
Henry Osborne
 
Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)
jeffz
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters
Lin Yo-An
 
Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015
Lukas Ruebbelke
 
深入浅出Jscex
深入浅出Jscex深入浅出Jscex
深入浅出Jscex
jeffz
 
JavaScript @ CTK
JavaScript @ CTKJavaScript @ CTK
JavaScript @ CTK
Jakob Mattsson
 
Generating Power with Yield
Generating Power with YieldGenerating Power with Yield
Generating Power with Yield
Jason Myers
 

Similar to Functional Patterns for the non-mathematician (20)

Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)
 
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02
 
Functional programming with php7
Functional programming with php7Functional programming with php7
Functional programming with php7
 
From Javascript To Haskell
From Javascript To HaskellFrom Javascript To Haskell
From Javascript To Haskell
 
Functional programming basics
Functional programming basicsFunctional programming basics
Functional programming basics
 
ECMAScript 6 new features
ECMAScript 6 new featuresECMAScript 6 new features
ECMAScript 6 new features
 
"Немного о функциональном программирование в JavaScript" Алексей Коваленко
"Немного о функциональном программирование в JavaScript" Алексей Коваленко"Немного о функциональном программирование в JavaScript" Алексей Коваленко
"Немного о функциональном программирование в JavaScript" Алексей Коваленко
 
Short intro to ECMAScript
Short intro to ECMAScriptShort intro to ECMAScript
Short intro to ECMAScript
 
EcmaScript 6
EcmaScript 6 EcmaScript 6
EcmaScript 6
 
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScript
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
Fat Arrow (ES6)
Fat Arrow (ES6)Fat Arrow (ES6)
Fat Arrow (ES6)
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
 
PHP Functions & Arrays
PHP Functions & ArraysPHP Functions & Arrays
PHP Functions & Arrays
 
Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters
 
Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015
 
深入浅出Jscex
深入浅出Jscex深入浅出Jscex
深入浅出Jscex
 
JavaScript @ CTK
JavaScript @ CTKJavaScript @ CTK
JavaScript @ CTK
 
Generating Power with Yield
Generating Power with YieldGenerating Power with Yield
Generating Power with Yield
 

Recently uploaded

RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 

Recently uploaded (20)

RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 

Functional Patterns for the non-mathematician