Implemented step 2.
This commit is contained in:
1 parent
97f047e10a
commit
df9e91ebd5
4 files changed
+149
-51
No files matched your search
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user