Does Go have the standard functional primitives?
Does the stan开发者_高级运维dard library (or a popular agreed-upon library) let me map, filter, fold etc. over slices/maps?
No. Go's type system doesn't cater for the usual form of these primitives because it lacks generics.
See also this thread on golang-nuts.
While Go does not have these primitives, it should be pointed out that the standard Go abstraction of a goroutine that you talk to through a channel will trivially give you entirely equivalent functionality in an asynchronous function.
精彩评论