Saturday, February 16, 2019

Getting Started

Getting Started

Let's get started by writing a test for a hypothetical function that adds two numbers. First, create a sum.js file: Then, create a file named sum.test.js. This will contain our actual test:

Algebraic Effects in JavaScript part 1 - continuations and control transfer

Algebraic Effects in JavaScript part 1 - continuations and control transfer

This is the first post of a series about Algebraic Effects and Handlers. Both approaches are valuables and give different insights on the topic. However, not everyone (including me), has the prerequisites to grasp the concepts of Category theory and Abstract Algebra.

Algebraic Effects in JavaScript part 2 - Capturing continuations with Generators

Algebraic Effects in JavaScript part 2 - Capturing continuations with Generators

This is the second part of a series about Algebraic Effects and Handlers. In the first post we introduced the notions of continuation and control transfer. We saw how programs written in Continuation Passing Style (CPS) are more flexible in terms of control transfer manipulation.

Yield! Yield! How Generators work in JavaScript.

Yield! Yield! How Generators work in JavaScript.

If the title doesn’t already give a hint, we will be discussing generators in this piece. Before going into generators let’s revise some basics about functions.

How to Make Pizza

How to Make Pizza

Our best recipe for pizza dough is adapted from the one used at Roberta’s, the pizza utopia in Bushwick, Brooklyn. It provides a delicate, extraordinarily flavorful dough that will last — and improve — in the refrigerator for up to a week.

Type-Safe & Composable GraphQL in Elm

Type-Safe & Composable GraphQL in Elm

Elm is the ideal language for building GraphQL requests. Because it is type-safe and has an expressive type system, you can take full advantage of having a typed API (i.e. your GraphQL Schema).

By example: Continuation-passing style in JavaScript

By example: Continuation-passing style in JavaScript

Continuation-passing style (CPS) originated as a style of programming in the 1970s, and it rose to prominence as an intermediate representation for compilers of advanced programming languages in the 1980s and 1990s.

Getting Started

Let's get started by writing a test for a hypothetical function that adds two numbers. First, create a sum.js file: Then, create a fil...