Sha256: a56e3ba532703e357b2b95109908bc99e3cfbdcaaea728aa0d7be1696328f064
Contents?: true
Size: 369 Bytes
Versions: 166
Compression:
Stored size: 369 Bytes
Contents
package letter const testVersion = 1 func ConcurrentFrequency(l []string) FreqMap { switch len(l) { case 0: return FreqMap{} case 1: return Frequency(l[0]) } ch := make(chan FreqMap) f := func(l []string) { ch <- ConcurrentFrequency(l) } half := len(l) / 2 go f(l[:half]) go f(l[half:]) m := <-ch for r, n := range <-ch { m[r] += n } return m }
Version data entries
166 entries across 166 versions & 1 rubygems