* Mikael Gustavsson [161208 03:55]:
> There's no need to use maps, you want to follow this pattern:
>
> for i := range items {
> if i==0 || !grouped(i-1, i) {
> appendToResult
> }
> appendToGroup
> }
>
> Here's the full example: https://play.golang.org/p/1e0rDDmq7b
Note that this only
There's no need to use maps, you want to follow this pattern:
for i := range items {
if i==0 || !grouped(i-1, i) {
appendToResult
}
appendToGroup
}
Here's the full example: https://play.golang.org/p/1e0rDDmq7b
--
You received this message because you are subscribed to the Google Group