map() to create utility functions to make our lives easier.
Needless to say, we covered a lot of ground in the last two posts on functional programming. If you have been following through my series on functional programming, give yourself a pat on the back. Great job!
If you don’t know what functional programming is, read an introduction to functional programming before proceeding. I also recommend reading my post on map (link attached in the first sentence of this post) and going through the exercises.
You need to understand how
forEach() works on an intimate level to get the most out of this tutorial.Continue reading
The quick sort algorithm (sometimes known as QuickSort or partition-exchange sort) is a very useful sorting algorithm that employs the divide and conquer approach.
Before proceeding, if you do not understand how the merge sort algorithm works, I recommend reading up on how the merge sort algorithm works before proceeding.
This will help you conceptualize the quick sort much more quickly.
Other topics that will help you conceptualize the quick sort algorithm include a knowledge and understanding of how recursive data structures such as the binary search tree works.
Once again, this post will be language agnostic. I will be writing out the logic in pseudo code so that regardless of programming language, you will be able to follow along.
For now, I am going start off with 5 features (there are a few more that I want to add to the list, but those will come in the near future).
This post is meant to be a summary of what I think are the best parts of ES6 and a summary of why I think it is. Therefore, unlike most of my other posts, I will not be diving into the specific behavior, theory and idiosyncrasies of each of the features mentioned in this post.
For the aforementioned reason, I would like to point out that this is not a detailed guide on each of these new ES6 features.
Rather, it is a overview of what I think are the best features that were shipped in ES6.
First of all, recursion is not impractical. It may be difficult to understand at first, but this is why I wrote this post. To bring clarity to this issue. Recursion is a great way of breaking a big problem into smaller, identical problems. Thus, it brings greater clarity to the readers of the code.
Before proceeding however, I recommend that readers brush up and study the following topics.
By the end of this post, I hope that the readers will
I believe that if you are fairly new to functional programming, you can learn a lot by simply studying these built in methods.
Why? Because these methods employ the core concepts of functional programming.
I am going to assume that you know a little about the basics of functional programming.
If not, I recommend reading an introduction to functional programming in JS before proceeding. Because we will be writing some code based off fundamental functional programming concepts.
In this tutorial, I am going to be testing your knowledge at certain points. Of course, I will provide as much background information as needed before throwing you into the pool.
Don’t worry, by the end of this tutorial, you will feel pretty confident about functional programming.
If you are like me, it would probably be along the lines of
As with my other post on Big O Notation and time complexity, I will try and break down the basics of functional programming. I will continue to update this post based off feedback and suggestions, in order to make this as valuable as possible to readers. Therefore, feedback is very much appreciated!
For those that have never dabbled in functional programming, this topic can initially be very hard to understand.
Supposedly, this topic has a steep learning curve.
Therefore, I am going to attempt to explain the concepts of functional programming in the simplest way possible.
Please provide feedback on parts that are difficult to digest. That way, I can update the content so that you, as the reader, get the most out of this tutorial.
With that being said, lets move straight onto the main contents.Continue reading