3 ms·
These aren't exactly fair comparisons. That's a (simple, standard) generic implementation, Go's is limited to a single type. Is there anything else beyond the
by 15155 12y ago
These aren't exactly fair comparisons.
That's a (simple, standard) generic implementation, Go's is limited to a single type.
Is there anything else beyond the generic type signature that makes this less readable to you?
Also, if you like, you could change that first sequence initialization to: (0..a.high).toSeq to keep it consistent with other 'method' calls.