functions/

directory
v0.0.0-...-fa54de9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2022 License: MIT

Directories

Path Synopsis
Anonymous self executing functions
Anonymous self executing functions
Call function is a function that's passed into another function as an argument.
Call function is a function that's passed into another function as an argument.
Go functions may be closures.
Go functions may be closures.
A "defer" statement invokes a function whose execution is deferred to the moment the surrounding function returns, either because the surrounding function executed a return statement, reached the end of its function body, or because the corresponding goroutine is panicking.
A "defer" statement invokes a function whose execution is deferred to the moment the surrounding function returns, either because the surrounding function executed a return statement, reached the end of its function body, or because the corresponding goroutine is panicking.
Functions are first class types in Go.
Functions are first class types in Go.
In other words, what an interface tells a type is, "If you have methods that match my functions, then you are my type"
In other words, what an interface tells a type is, "If you have methods that match my functions, then you are my type"
Recursion happens when a function calls itself.
Recursion happens when a function calls itself.
Functions are first class types in Go and hence can be returned from a function just like any other type
Functions are first class types in Go and hence can be returned from a function just like any other type
When we have a slice of some type, we can pass in the individual values in a slice by using the “...” operator.
When we have a slice of some type, we can pass in the individual values in a slice by using the “...” operator.
We can create a function which takes an unlimited number of arguments Parameter that can accept unlimited number of arguments is known as a “variadic parameter.” We use the lexical element operator ...T to specify variadic parameter of type T
We can create a function which takes an unlimited number of arguments Parameter that can accept unlimited number of arguments is known as a “variadic parameter.” We use the lexical element operator ...T to specify variadic parameter of type T

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL