Instantly share code, notes, and snippets.

View fp-in-js.txt
Functional Programming Jargon in simple terms:
https://github.com/hemanth/functional-programming-jargon
Professor Frisby's Mostly Adequate Guide to Functional Programming (book):
https://drboolean.gitbooks.io/mostly-adequate-guide/content/
A series on FP in JS from Eric Elliott:
https://medium.com/javascript-scene/the-rise-and-fall-and-rise-of-functional-programming-composable-software-c2d91b424c8c
Some introduction to Monads:
View 1-ajax.js
const vehicleToHtml = obj => {
return `<div id="${obj.id}">${obj.name}</div>`;
};
$.ajax({
url: '/get/all/vehicles',
success: vehicles => {
const html = vehicles.map(vehicleToHtml);
// const html = vehicles.map(v => new Vehicle(v)).map(v => v.toHtml());
document.querySelector('#list').innerHTML = html;
View example.html
<!doctype html>
<html>
<head>
<meta name="charset" content="utf-8"/>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="author" content="Adam Beres-Deak"/>
<meta name="viewport" content="width=device-width"/>
<style>
body {