Skip to content

Instantly share code, notes, and snippets.

@WyriHaximus
Created October 11, 2016 20:05
Show Gist options
  • Select an option

  • Save WyriHaximus/b43608624d8b406cb7c2d2737c7222c8 to your computer and use it in GitHub Desktop.

Select an option

Save WyriHaximus/b43608624d8b406cb7c2d2737c7222c8 to your computer and use it in GitHub Desktop.
<?php
$s
->lift(function () {
return new CutOperator(' ');
})
->map('json_decode')
->hydrate('Resource')
->subscribeCallback(function ($x) {
echo "-" . $x . "-\n";
});
<?php
$s
->lift(function () {
return new CutOperator(' ');
})
->map('json_decode')
->map(function ($json) use ($hydrator) {
return $hydrator->hydrate('Resource', $json);
})
->subscribeCallback(function ($x) {
echo "-" . $x . "-\n";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment