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

Terminal functions

Terminal functions are eagerly executed. They execute immediately and once executed, they execute all the previous intermediate, lazy functions in the call chain. Terminal functions either return a single value or produce a side effect. The reduce example, we saw earlier, returns a single value: 1. The ForEach function does not return a value but can produce a side effect, such as printing out each item. The Collect, Join, and GroupBy functions group items in a collection.

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