Created
January 12, 2021 16:57
-
-
Save NitinPraksash9911/47f09af471cfef574d72e11d383f1f73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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