1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-17 16:47:22 +03:00
mal/chuck/step0_repl.ck

35 lines
447 B
Plaintext
Raw Normal View History

2016-04-20 23:31:28 +03:00
fun string READ(string input)
{
return input;
}
fun string EVAL(string input)
{
return input;
}
fun string PRINT(string input)
{
return input;
}
fun string rep(string input)
{
return input => READ => EVAL => PRINT;
}
fun void main()
{
ConsoleInput stdin;
string input;
while( true )
{
stdin.prompt("user>") => now;
stdin.getLine() => input;
chout <= rep(input) + "\n";
}
}
main();