with a more complex type system that you cannot express in go.  A
good, simple example is "map".  Go would need generics to support it.

$GOOROOT/src/pkg/bytes/bytes.go:248 func ToLower(s []byte) []byte
 { return Map(unicode.ToLower, s) }

I should have been more clear.  I mean a generic map of over
a container of an arbitrary type.  You can definitely define
maps over specific types.  The bytes.Map function maps
a function from int to int over an array (or slice?  I'm
not yet that familiar with go) of bytes.  If you wanted a
function that maps a function from int to float over an array
of ints you would need to write another function.

Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com

Reply via email to