mirror of
https://github.com/kanaka/mal.git
synced 2024-09-17 16:47:22 +03:00
35 lines
447 B
Plaintext
35 lines
447 B
Plaintext
|
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();
|