Adhering to DRY, passing multiple lambdas to a method, thereby using a single traversal method