Function type
A function type is a type that specifies the parameter types and return type of callable values.
Kotlin in Action, 2E
A function type describes the parameter types and return type of callable values.
- How it is used
- Enables higher-order functions that receive, store, and return behavior as lambda or function-reference values.
- How deep it goes
- Explains syntax, invocation, nullability placement, named parameters, returned functions, and predicate-based reuse; defers lambda performance to inline functions.
- Examples
- Uses arithmetic operations, a String filter, shipping-cost selection, contact filtering, and site-visit duration queries.
- What you can do after
- Build it from scratch by declaring function-typed variables, parameters, and returns, then passing or invoking lambdas.
Learn Haskell by Example
A function type specifies the input and output types of a function value.
- How it is used
- Uses function types to document definitions, check operator compatibility, and shape practical encryption and synthesizer components.
- How deep it goes
- Explains unary and curried function types, lambda notation, syntactic sugar, and operator-driven type errors without covering deeper type-system internals.
- Examples
- Uses square and add definitions, mixed Int and Double multiplication, character rotation, and Event-to-Signal oscillators.
- What you can do after
- Evaluate and write Haskell signatures for unary, multi-argument, and function-valued definitions while diagnosing simple type mismatches.
Geometry for Programmers
A function type specifies the kinds of inputs and outputs a function accepts, including its domain and codomain.
- How it is used
- Frames geometric modeling functions by matching mathematical domains and codomains with programming input and output types.
- How deep it goes
- Defines domains and codomains, then distinguishes transformations and vector fields, without developing their later chapters’ mechanics.
- Examples
- Uses translation of a square in ℝ² and vector-field illustrations to ground abstract function types.
- What you can do after
- Evaluate/understand geometric functions by identifying their input spaces, output spaces, and per-input values.
100 Go Mistakes and How to Avoid Them
A function type is a Go type whose values are functions with a specified parameter and result signature.
- How it is used
- Uses function types to inject time dependencies and make unit tests deterministic.
- How deep it goes
- Defines a named function type, wires production and test implementations, and contrasts function injection with global state and explicit arguments.
- Examples
- Uses Cache, time.Now, TrimOlderThan, fixed timestamps, and a fake func() time.Time implementation.
- What you can do after
- Build deterministic time-dependent tests by injecting a function that returns a controlled timestamp.
Read how 100 Go Mistakes and How to Avoid Them explains function type →
Related concepts
- Kotlinused by · Kotlin is a statically typed general-purpose programming language that targets the JVM and other platforms and interoperates with Java.
- data typekind of · A data type is a classification that specifies the values data can represent, how they are represented or interpreted, and which operations apply to them.
- atomic typekind of · An atomic type is a type whose supported accesses and operations are indivisible with respect to concurrent execution and provide defined synchronization semantics.
- factorialequivalent to · The factorial of a nonnegative integer n, written n!, is the product of all positive integers from 1 through n, with 0! equal to 1.
- FunctionN interfaceequivalent to · A FunctionN interface is a compiler-generated Kotlin interface representing a function value with a specific number of parameters and an invoke operation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



