Optional function as parameter to score_items.