aboutsummaryrefslogtreecommitdiff
path: root/template/go/snip-min-slice.go
blob: 733bcdc6cb36cc91011393073e59e56e776a5e4b (plain)
1
2
3
4
5
6
7
8
9
func min(a []{{_input_:type}}) {{_input_:type}} {
	m := a[0]
	for _, v := range a {
		if v < m {
			m = v
		}
	}
	return m
}