nwaku/waku/common/utils/sequence.nim

8 lines
145 B
Nim

{.push raises: [].}
proc flatten*[T](a: seq[seq[T]]): seq[T] =
var aFlat = newSeq[T](0)
for subseq in a:
aFlat &= subseq
return aFlat