The importance of Type systems to FP
The purpose of a type system is to reduce bugs by defining the interfaces between the different functions in a program and verifying that those functions can be reliably connected. Types can be a simple as strings, ints, and booleans or can be a complex data structure with embedded fields and interfaces. Types can be checked at compile time or runtime.
The Lambda Calculus was originally untyped, but Alonzo Church found that that though it was more expressive, it caused inconsistencies. So, Church introduced a typed version to simplify computation. We use type systems for similar reasons, that is, to improve determinism and to help prevent bugs.
Since in FP a function is a data type, we need to define our functions' type for the type system.
A type system can also increase our programs' runtime performance. Go is a statically compiled language, so the data types are known at compile time. This makes type erasure possible. So, Go does not have to require our...