Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can write map but it's a lot of boilerplate and you loose types

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



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

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: