Egghead Instructor Ian Hofmann-Hicks

Ian Hofmann-Hicks

Living to Learn and Learning to Live. Love to learn all the things I don't know and share the stuff I learn in the process.



Support Ian's Free Lessons
become a member today

Browse Ian Hofmann-Hicks's lessons.

showing 3 lessons...

Use a Javascript Array to Construct a Maybe

Create Streams From Iterables With Most.js

Create Streams From Single Values With Most.js

js tutorial about Use a Javascript Array to Construct a Maybe

Use a Javascript Array to Construct a Maybe

7:19 js

Much of our code in real life is full of if statements that check the validity of a given input to see if a given computation should be performed. Using the ever popular Maybe construction allows us capture this disjunction in one place, keeping our functions free of similar if statements that can pollute the intention of the function. You do not even need a fancy library to get this benefit, as Javascript ships with everything you need with it's build in Array.

js tutorial about Create Streams From Iterables With Most.js

Create Streams From Iterables With Most.js

3:59 js

One of the more powerful functions for creating streams in MostJS is the from function.

In this lesson, we use from to create streams from various Javascript Iterables, take a look at how to throw generator functions into the mix and, for good measure, take a sneak peek at how we can limit our streams using a function called take.

As a bonus, we see what it looks like to use Function.prototype.bind for a quick and dirty way to partially apply arguments to a function.

js tutorial about Create Streams From Single Values With Most.js

Create Streams From Single Values With Most.js

2:01 js

Most provides many means for creating streams, the simplest of which is the of function. In this lesson, we demonstrate the use of of to lift a single value into a stream. We also show off the just alias of of, as well as, a common method for currying a function.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?