Skip to Content
Learning Functional Programming in Go
book

Learning Functional Programming in Go

by Lex Sheehan
November 2017
Intermediate to advanced
670 pages
17h 35m
English
Packt Publishing
Content preview from Learning Functional Programming in Go

The bind operation

We accomplish this feat using the Monad's bind operation:

In Haskell, it’s called the bind operation. Other names for bind include flatMap, flatten, andThen, collect, and SelectMany. (That's part of what makes functional programming confusing--different languages use different names for the same thing.) The Lexical Workflow calls it Next.

More descriptive names might be adapt, link, or even hard shove. (In our code example, we'll use the name Next, because it makes the most sense in the context of moving to the Next step.) Bind is a pattern that adapts the one-input, two-output block to a two-input, two-output block. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781787281394Supplemental Content