In Go, functions are first-class values. You can assign them to variables, pass them as arguments, and return them from other functions:
add := func(a, b int) int {
return a + b
}
result := add(3, 5) // result is 8
The variable add holds a function. You call it just like a named function. This opens up patterns like callbacks and higher-order functions that take other functions as arguments.