9136d17843
Avoids the special case of "|> WriteableStreamType".
15 lines
239 B
Swift
Executable File
15 lines
239 B
Swift
Executable File
#!/usr/bin/env swiftshell
|
|
|
|
import SwiftShell
|
|
|
|
/*
|
|
var i = 1
|
|
for line in standardinput.lines() {
|
|
print("line \(i++): ")
|
|
println(line)
|
|
}
|
|
*/
|
|
|
|
var i = 1
|
|
standardinput.lines() |> map {line in "line \(i++): \(line)\n"} |> write(standardoutput)
|