A controlled input's value lives in state. Events, one per line: type X (append X), backspace (remove last char), clear. Print the input value after all events (or (empty)).
Input: event lines.
Output: final value.
Your program reads from stdin and prints to stdout.
A controlled input's value lives in state. Events, one per line: type X (append X), backspace (remove last char), clear. Print the input value after all events (or (empty)).
Input: event lines.
Output: final value.
Your program reads from stdin and prints to stdout.