Created
September 12, 2018 11:30
-
-
Save joelhinz/2b0c0a29c9884be8c2d85f2b79fc8c49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$countries->map(function ($country) { | |
return $country->capital; | |
})->reject(function ($capital) { | |
return $capital->isTiny(); | |
})->partition(function ($capital) { | |
return $capital->hasMayor(); | |
}); | |
$countries->map->capital | |
->reject->isTiny() | |
->partition->hasMayor(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment