mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-09 14:26:27 +00:00
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
|