css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Posts tagged functional programming

Currying Functions in Javascript

Currying is the process of taking a function that accepts some number of arguments, then creating a new version of that function that can accept an "incomplete" argument list. When given...

A Quick Racket Shorthand

In Racket, and in many functional programming languages, it's a very common occurence to make simple one-off anonymous functions to pass as arguments to other functions. A classic racket...

Thrush Combinator in Racket

(This post is based on a lot of the work presented in Greg Hendershott's blog post "The ~> Threading Macro", however this implementation does not use macros)

The thrush combinator...

Extensions to the Thrush Combinator

The thrush combinator is very useful for allowing us to express a computation as a series of function calls in a declarative way, but it has some issues in the way of rigidity. It only allows...

Predicates in Javascript

A predicate is a function that takes one item as input and returns either true or false based on whether the item satisfies some condition. They're quite useful for interrogating objects to...

Expressing Conditions with Predicates and Functions

This post builds on Predicates in Javascript, I recommend reading that first

It is frequently the case that we want to perform some operation on an object only if a condition about that object...

Functional Programming

So I've learned that contrary to what I wrote in my previous post, JavaScript does make public functions and reusable code available. They're just not declared that way. I figured it had to...

Functional Workaholism

Over the last year or so I've been learning functional programming (FP) and trying to fold it into my basic approach to software. I'd like to frame it here the way I'd teach it to...

Ghibli-ish Examples to Functional Programming and Composition in JavaScript

Functional programming (FP) was very daunting to me at first (and still can be), but it doesn't have to be completely mind-boggling to get started. Sometimes, you just need some basic examples,...

Using Bash Functions To Start A Local Environment Quicker

I can never remember what command(s) to type in Terminal to start my local development environments. Even after a few months on a project, I'm always going back to my documentation after every...

Arrow Functions in ECMA Script 6:

ECMA Script 6 | Arrow Functions =

Arrow Functions in ECMA Script 6:

Introduction:

Arrow functions allow us to store functions as Constants and Variables.

Body:

The following piece of code...