Last active
May 8, 2019 05:07
-
-
Save datashaman/3cf16096f1c5f651c88d82dd608171eb to your computer and use it in GitHub Desktop.
Datashaman\Logic\lefts Example
This file contains hidden or 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 | |
| <<<CONFIG | |
| packages: | |
| - "datashaman/logic: dev-master" | |
| CONFIG; | |
| # | |
| # This is a Melody script. http://melody.sensiolabs.org/ | |
| # | |
| use function Datashaman\Logic\lefts; | |
| use function Datashaman\Logic\mkLeft; | |
| use function Datashaman\Logic\mkRight; | |
| use function Datashaman\Logic\repr; | |
| $es = [mkLeft('ERR'), mkRight('OK'), mkRight('OK Too'), mkLeft('ERR 13')]; | |
| echo repr(lefts($es)) . PHP_EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment