You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
415 B

Lookup := Object clone do(
find := method(query, caller,
wait(2);
caller @@onFind(query asUppercase)
)
)
UI := Object clone do(
run := method(
stdin := File standardInput
loop(
"Give me a movie" println
line := stdin readLine
Lookup clone @@find(line, self)
yield
)
)
onFind := method(response,
"Got response: " println
response println
)
)
UI run