Improve sample code

Fix base for `distinct` (should be `throttled`, was `keyups`);
remove unnecessary function expression.