I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
LONDON | |
=== | |
South Bank | |
Millenium Bridge | |
Blackfriars Bridge | |
Tower Bridge | |
Tower of London | |
Trafalgar Square | |
Rascacielos de Bank y Shoredich | |
Soho |
Copyright © 2020, Philippe Bastiani.
with this restriction: this GIST could be, all or part, updated, copied, diffused for documentary purposes in the Λrrow project.
This GIST is an attempt to describe a repeatable, and automatable, process for building an embedded Domain Specific Language (DSL) with the help of a Free monad.
As material, i'll use Λrrow, the functional companion to Kotlin's Standard Library.
Disclaimer: This GIST assumes that you are roughly familiar with the concept of Free monad.
const Day = ({ get, left, right }) => { | |
const map = f => Day ({ | |
get: f (extract()), | |
left, right | |
}) | |
const extend = f => | |
Day ({ | |
get: (left, right) => f (Day ({ get, left, right })), |