Files
deno-mal/src/step0_repl.ts
T
2025-05-26 10:28:11 -04:00

26 lines
416 B
TypeScript

import {readUserInputs} from "./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)))
}
export function main(): void {
for(const userInput of readUserInputs()){
rep(userInput);
}
}