Skip to content

Instantly share code, notes, and snippets.

@datashaman
Created May 8, 2019 05:18
Show Gist options
  • Save datashaman/61566567fa4edcd041950365f72823b2 to your computer and use it in GitHub Desktop.
Save datashaman/61566567fa4edcd041950365f72823b2 to your computer and use it in GitHub Desktop.
Datashaman\Logic\I Example
<?php
<<<CONFIG
packages:
- "datashaman/logic: dev-master"
CONFIG;
#
# This is a Melody script. http://melody.sensiolabs.org/
#
use function Datashaman\Logic\I;
use function Datashaman\Logic\repr;
$f = I();
echo repr($f(null)) . PHP_EOL;
echo repr($f(12)) . PHP_EOL;
echo repr($f('hello world')) . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment