mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 13:55:55 +03:00
21 lines
363 B
Dart
21 lines
363 B
Dart
|
import 'dart:io';
|
||
|
|
||
|
String READ(String x) => x;
|
||
|
|
||
|
String EVAL(String x) => x;
|
||
|
|
||
|
String PRINT(String x) => x;
|
||
|
|
||
|
String rep(String x) => PRINT(EVAL(READ(x)));
|
||
|
|
||
|
const prompt = 'user> ';
|
||
|
main() {
|
||
|
while (true) {
|
||
|
stdout.write(prompt);
|
||
|
var input = stdin.readLineSync();
|
||
|
if (input == null) return;
|
||
|
var output = rep(input);
|
||
|
stdout.writeln(output);
|
||
|
}
|
||
|
}
|