mirror of https://github.com/waku-org/nwaku.git
13 lines
238 B
Nim
13 lines
238 B
Nim
|
when (NimMajor, NimMinor) < (1, 4):
|
||
|
{.push raises: [Defect].}
|
||
|
else:
|
||
|
{.push raises: [].}
|
||
|
|
||
|
import std/sequtils
|
||
|
|
||
|
proc flatten*[T](a: seq[seq[T]]): seq[T] =
|
||
|
var aFlat = newSeq[T](0)
|
||
|
for subseq in a:
|
||
|
aFlat &= subseq
|
||
|
return aFlat
|