View Problem

Process a file one line at a time

Open the source file to your solution and print each line in the file, prefixed by the line number, like:
1> First line of file
2> Second line of file
3> Third line of file
File(`input.text`).readAllLines.each |Str s, Int i| { echo("${i+1}> $s") }

Submit a new solution for fantom
There are 27 other solutions in additional languages (clojure, cpp, csharp, erlang ...)