We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
where does the val list head :: rest appear from in the following function ?
head :: rest
def groupSorted[K,S,V]( it : Iterator[((K, S), V)] ) : Iterator[(K, List[(S, V)])] = { val res = List[ (K, ArrayBuffer[(S, V)]) ]() it.foldLeft(res)( (list, next) => list match { case Nil => val ((firstKey, secondKey), value) = next List((firstKey, ArrayBuffer((secondKey, value)))) case head :: rest => val (curKey, valueBuf) = head val ((firstKey, secondKey), value) = next if (!firstKey.equals(curKey) ) { (firstKey, ArrayBuffer((secondKey, value))) :: list } else { valueBuf.append((secondKey, value)) list } } ).map { case (key, buf) => (key, buf.toList) }.iterator }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
where does the val list
head :: rest
appear from in the following function ?The text was updated successfully, but these errors were encountered: