public static function forSum(callable $num): self {
        return new self(
                function() { return 0; },
                function(&$result, $element) use($num) { $result+= $num($element); }
        );
    }
public static function forSum(callable $num): self {
        return new self(
                function() { return 0; },
                function(&$result, $element) use($num) { $result+= $num($element); }
        );
    }
public static function forSum ( callable $ num ) : self { return new self ( function ( ) { return 0 ; } , function ( & $ result , $ element ) use ( $ num ) { $ result += $ num ( $ element ) ; } ) ; }
returns a collector to sum up elements

@api
@param   callable  $num  callable which retrieves a number from a given element
@return  \stubbles\sequence\Collector
returns a collector to sum up elements