Go people will do this and they'll be content:<p><pre><code> a := []int{1,2,3,4}
it := slices.All(a)
it = slices.Reverse(it)
it = slices.Map(it)
it = slices.Filter(it, func(i int) bool { return i % 2 == 0 })
slices.ForEach(it, func(i int) { fmt.Println(i) })
</code></pre>
I don't judge the Go enjoyers, but I prefer writing TypeScript to Go which says it all.<p>Type-inferred arrow lambda for function arguments would go such a long way in making this code nicer... And not make compilation slower at all.<p><pre><code> it = slices.Filter(it, i => i % 2 == 0)
slices.ForEach(it, i => fmt.Println(i))</code></pre>