Skip to content

Instantly share code, notes, and snippets.

@dacr
Created March 28, 2025 09:02
Show Gist options
  • Save dacr/3d1179604359ff10d7c1123d65cce2d1 to your computer and use it in GitHub Desktop.
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/d4a236ef95f128be685ad039f34e4859e902401
/*?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 NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// 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