29 lines
423 B
TypeScript
29 lines
423 B
TypeScript
import {readUserInputs} from "./src/shared.ts";
|
|
|
|
function read(source: string): string {
|
|
return source;
|
|
}
|
|
|
|
function eval_(ast: string): string {
|
|
return ast;
|
|
}
|
|
|
|
function print(form: string): string {
|
|
return form
|
|
}
|
|
|
|
function rep(source: string): string{
|
|
return print(eval_(read( source)))
|
|
}
|
|
|
|
|
|
|
|
function main(): void {
|
|
for(const userInput of readUserInputs()){
|
|
rep(userInput);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
main(); |