rubyish code block & ref args. Implemented trial sort, map and grep