Make foldRight clearer in getItems of Query