aboutsummaryrefslogtreecommitdiff
path: root/content/first-class-functions-in-go-and-new-go.article
blob: a6f6728f33ed9c5598b5edd953eec9b6dd1f3324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# "First Class Functions in Go"
30 Jun 2011
Tags: codewalk, function, technical
Summary: Programmers new to Go are often surprised by its support for function types, functions as values, and closures. The [First Class Functions in Go](https://golang.org/doc/codewalk/functions/) code walk demonstrates these features with a simulation of the dice game [Pig](http://en.wikipedia.org/wiki/Pig_(dice)). It is a pretty program that uses the language to great effect, and a fun read for Go beginners and veterans alike.

Andrew Gerrand

##

Programmers new to Go are often surprised by its support for function types,
functions as values, and closures.
The [First Class Functions in Go](https://golang.org/doc/codewalk/functions/)
code walk demonstrates these features with a simulation of the dice game
[Pig](http://en.wikipedia.org/wiki/Pig_(dice)).
It is a pretty program that uses the language to great effect,
and a fun read for Go beginners and veterans alike.

More resources are available at [golang.org](https://golang.org/doc/docs.html).