sub input_state { my ($heap, $input, $wheel_id) = @_[HEAP, ARG0, ARG1]; print "Echoing input from wheel $wheel_id: $input\n"; $heap->{wheel}->put($input); # Echo it back. }