Hacker News new | ask | show | jobs
by lukasm 4288 days ago
You can write map but it's a lot of boilerplate and you loose types

Map func(interface{}, func(interface{}) interface{}) []interface{}

1 comments

You also loose the ability to pass existing functions with your implementation of Map

  Map([]string{"a", "b", "c", "d"}, ToUpper)