Writing Fluent Functional Codeby@hesher
3,862 reads

Writing Fluent Functional Code

May 13th 2020
3m
by @hesher 3,862 reads
tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

The most straightforward functional approach is using `pipe()` with stateless setters. This pattern doesn’t allow you chaining, but some of us need chaining to feel comfortable in reading code. The idea here is that the expression builder is based on a curried function that accepts a path defined by lens. value: value: the value to write to the path defines by lens, value: set will return a new object (never mutate) based on the source object with the new property and value.

Coin Mentioned

Mention Thumbnail
featured image - Writing Fluent Functional Code
Ben HackerNoon profile picture

@hesher

Ben

Receive Stories from @hesher

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!