mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
* move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
20 lines
389 B
Nim
20 lines
389 B
Nim
discard """
|
|
targets: "cpp"
|
|
action: "compile"
|
|
"""
|
|
|
|
import sequtils, strutils
|
|
|
|
when defined(nimPreviewSlimSystem):
|
|
import std/syncio
|
|
|
|
|
|
let rules = toSeq(lines("input"))
|
|
.mapIt(it.split(" => ").mapIt(it.replace("/", "")))
|
|
.mapIt((it[0], it[1]))
|
|
|
|
|
|
proc pp(s: string): auto =
|
|
toSeq(lines(s)).mapIt(it.split(" => ").mapIt(it.replace("/", ""))).mapIt((it[0], it[1]))
|
|
echo pp("input")
|