Skip to content

Instantly share code, notes, and snippets.

@Leko
Last active October 28, 2015 17:30
Show Gist options
  • Save Leko/46fc68dd2268dad9018e to your computer and use it in GitHub Desktop.
Save Leko/46fc68dd2268dad9018e to your computer and use it in GitHub Desktop.
interface多すぎ、generics使いたいつらい・・・
func Each(list []interface{}, iteratee func(el interface{}, index int, list *[]interface{})) {
}
func Map(list []interface{}, iteratee func(el interface{}, index int, list *[]interface{}) interface{}) []interface{} {
}
func Reduce(list []interface{}, iteratee func(memo interface{}, value interface{}, index int, list *[]interface{}) interface{}, memo interface{}) interface{} {
}
func ReduceRight(list []interface{}, iteratee func(memo interface{}, value interface{}, index int, list *[]interface{}) interface{}, memo interface{}) interface{} {
}
func Filter(list []interface{}, predicate func(value interface{}) interface{}) []interface{} {
}
func Reject(list []interface{}, predicate func(value interface{}) interface{}) []interface{} {
}
func Every(list []interface{}, predicate func(value interface{}) interface{}) bool {
}
func Some(list []interface{}, predicate func(value interface{}) interface{}) bool {
}
func Contains(list []interface{}, value interface{}) bool {
}
func Max(list []interface{}, iteratee func(value interface{}, index int, list *[]interface{}) int) interface{} {
}
func Min(list []interface{}, iteratee func(value interface{}, index int, list *[]interface{}) int) interface{} {
}
func IndexOf(list []interface{}, value interface{}) int {
}
func LastIndexOf(list []interface{}, value interface{}) int {
}
func Sort(list []interface{}, iteratee func(a interface{}, b interface{}) int) []interface{} {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment