We do not yet have a consensus about how to write anonymous functions. Currently two different versions are in use in D8:
With a space between the function and the opening parenthesis:
<?php
$callback = function ($parameter) use ($variable) {
}
?>
Or without a space between the function and the opening parenthesis:
<?php
$callback = function($parameter) use ($variable) {
}
?>
Both are being used in the D8 codebase at the moment.