Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active February 3, 2026 20:24
Show Gist options
  • Select an option

  • Save dacr/3d1179604359ff10d7c1123d65cce2d1 to your computer and use it in GitHub Desktop.

Select an option

Save dacr/3d1179604359ff10d7c1123d65cce2d1 to your computer and use it in GitHub Desktop.
go lambdas / published by https://github.com/dacr/code-examples-manager #27ede8f8-b106-476e-bb2d-02a7bae0f6ab/ecce6852dcc0d598f5e4e21c85cf31ac7cf50c41
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go lambdas
// keywords : go, lambdas, @testable
// publish : gist
// authors : David Crosson
// license : Apache License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
// id : 27ede8f8-b106-476e-bb2d-02a7bae0f6ab
// created-on : 2025-03-27T09:55:31+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"
package main
func main() {
add := func(a, b int) int {
return a + b
}
show := func(v int) {
println(v)
}
show(add(1, 2))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment