Skip to content

Instantly share code, notes, and snippets.

@NitinPraksash9911
Created January 12, 2021 16:57
Show Gist options
  • Save NitinPraksash9911/47f09af471cfef574d72e11d383f1f73 to your computer and use it in GitHub Desktop.
Save NitinPraksash9911/47f09af471cfef574d72e11d383f1f73 to your computer and use it in GitHub Desktop.
interface Reader {
fun read():Char
}
interface Writer {
fun write(ch Char)
}
public fun copy(r Reader, w Writer ){
var ch Char
while((ch=r.read)!=EOF){
w.write(ch)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment