Hello ■■■■,
I have to implement a function of the following form:
func appendFunc (dst func ([] int), src ... func ([] int)) func ([] int)
This function takes as an argument some function for processing dst slices and an unlimited number of other processing functions that need to be “attached” to the dst function and return a new function
I stuck in this code
func appendFunc(src ...func([]int)) func() {
numsSlice := []int{9, 0, 1, 8, 7, 2, 3, 4, 6, 5}
return func() {
fmt.Println("this wont be printed")
for _, i := range src {
i(numsSlice)
}
}
}
func main() {
appendFunc(SortSlice, IncrementOdd, PrintSlice, ReverseSlice)
}
wae it shows nothing?