Writing fluent functional codeby@hesher
3,915 reads
3,915 reads

Writing fluent functional code

by Ben2mJune 7th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Writing fluent functional code
Ben HackerNoon profile picture
Ben

Ben

@hesher

Share Your Thoughts

About Author

Ben HackerNoon profile picture
Ben@hesher

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!