JavaScript the Fun Part



If we view the workflow of FP at the highest level of abstraction, it is alike a pipeline.

Pipeline architecture has many use cases, but in its simplest form is a combination of

with which we can combine some pipes and some filters and get a pipeline.

In this model, things, which can by anything, go through a series of steps, which can be any steps, to get the final desire result.


Here are some examples of this model.

We will see more examples in upcoming posts.

New Terms

With any new concept comes new terms. In fact one of a big challenging part of learn functional programming is to understand these new terms which are a lot.

But we are not going to memorize them, nor want to talk about all of them; just a new terms related to pipeline architecture.

Four kinds of filter we have:

Distributed Architecture

It is noticeable that pipeline architecture itself is a kind of distributed architecture. In this model components, platforms, or whatever we have are separate from each other.

And how they work together? Using communication. For example:

is also a kind of distributed architecture and client and server has communication over network.

As another example, in UNIX world and working with commands (= CLIs) on a Terminal, we have IPC-Ch (= Inter Process Communication Channel) that sent data from left command is sent into next command which is after pipe (= |).

echo {a..f} | tr [:lower:] [:upper:] | tr ' ' '\n' | sort -r 

Mapping CLIs and pipes in UNIX's world to software and codding, we can see that we can separate our

from each others. While in OOP style data and function are collected into a class but in FP's world we tend to separate them.

Let focus and data and function in more details in next post.

Read more

Update: Sun Oct 20 2019 08:38:22 GMT+0330 (Iran Standard Time)