|
|
|
|
|
by culi
1283 days ago
|
|
Hmm that's a good show of Ruby's great built-ins for Enumerable, but can't any language with a findIndex and a Set achieve the same thing? I.e. in JS: myString.split('').findIndex((c, i, arr) => new Set(arr.slice(i-4, i)).size == 4)
|
|