t6986.nim 332 B

1234567891011121314151617
  1. discard """
  2. targets: "cpp"
  3. action: "compile"
  4. """
  5. import sequtils, strutils
  6. let rules = toSeq(lines("input"))
  7. .mapIt(it.split(" => ").mapIt(it.replace("/", "")))
  8. .mapIt((it[0], it[1]))
  9. proc pp(s: string): auto =
  10. toSeq(lines(s)).mapIt(it.split(" => ").mapIt(it.replace("/", ""))).mapIt((it[0], it[1]))
  11. echo pp("input")