import sequtils, strutils proc newValList(size: Positive): seq[int] = if (size and 1) != 0: raise newException(ValueError, "size must be even.") result = toSeq(1..size) func shuffled(list: seq[int]): seq[int] = result.setLen(list.len) let half = list.len div 2 for i in 0..