<?php
  $E__ 
= &$GLOBALS;
  function 
get ($thing$key) {
    do {
      
$E__ $thing[$key];
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
call_closure ($closure$x) {
    do {
      
$args = array();
      foreach(
$x as $key => $value$args[$closure[1][$key]] = $value;
      
$t $closure[0] == null;
      
$w = (($t != null) ? (array()) : (get($closure0)));
      
$E__ call_user_func(get($closure2), array_merge($w$args));
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
call () {
    do {
      
$x func_get_args();
      
$closure get($x0);
      
array_shift($x);
      
$E__ = ((function_exists($closure) != null) ? (call_user_func_array($closure$x)) : (call_closure($closure$x)));
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
err ($x) {
    do {
      
file_put_contents("php://stderr"$x);
      
$E__ 0;
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
pr ($stream$string) {
    do {
      
file_put_contents($stream$string);
      
$E__ 0;
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
println ($x) {
    do {
      print(
$x);
      print(
"\n");
      
$E__ 0;
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
_first ($E__) {
    do {
      
$get $E__["get"];
      
$list $E__["list"];
      
$E__ get($list0);
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
_rest ($E__) {
    do {
      
$array_shift $E__["array_shift"];
      
$list $E__["list"];
      
array_shift($list);
      
$E__ $list;
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
___EQUAL__ ($E__) {
    do {
      
$inline $E__["inline"];
      
$a $E__["a"];
      
$b $E__["b"];
      
$E__ $a == $b;
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
_empty__QMARK__ ($E__) {
    do {
      
$if $E__["if"];
      
$__EQUAL__ $E__["="];
      
$sizeof $E__["sizeof"];
      
$list $E__["list"];
      
$true $E__["true"];
      
$false $E__["false"];
      
$E__ = ((call(($E__["="] ? $__EQUAL__ $GLOBALS["__EQUAL__"]), 0sizeof($list)) != null) ? (true) : (false));
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
_reduce ($E__) {
    do {
      
$if $E__["if"];
      
$empty__QMARK__ $E__["empty?"];
      
$list $E__["list"];
      
$init $E__["init"];
      
$recur $E__["recur"];
      
$fun $E__["fun"];
      
$first $E__["first"];
      
$list__HYPHEN__ $E__["list-"];
      
$rest $E__["rest"];
      
$E__ = ((call(($E__["empty?"] ? $empty__QMARK__ $GLOBALS["empty__QMARK__"]), $list) != null) ? ($init) : (array_merge($E__, array("fun" => $fun"init" => call($fun$initcall(($E__["first"] ? $first $GLOBALS["first"]), $list__HYPHEN__)), "list" => call(($E__["rest"] ? $rest $GLOBALS["rest"]), $list), "qSGlk2" => true))));
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
hAsEo4 ($E__) {
    do {
      
$array_unshift $E__["array_unshift"];
      
$list $E__["list"];
      
$a $E__["a"];
      
array_unshift($list$a);
      
$E__ $list;
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
_cons ($E__) {
    do {
      
$λ $E__["λ"];
      
$list $E__["list"];
      
$array_unshift $E__["array_unshift"];
      
$a $E__["a"];
      
$if $E__["if"];
      
$__EQUAL__ $E__["="];
      
$b $E__["b"];
      
$array $E__["array"];
      
$E__ call(array(array("array_unshift" => $E__["array_unshift"], "a" => $E__["a"]), array("list"), "hAsEo4"), ((call(($E__["="] ? $__EQUAL__ $GLOBALS["__EQUAL__"]), 0$b) != null) ? (array()) : ($b)));
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
_map ($E__) {
    do {
      
$if $E__["if"];
      
$empty__QMARK__ $E__["empty?"];
      
$l $E__["l"];
      
$cons $E__["cons"];
      
$f $E__["f"];
      
$first $E__["first"];
      
$map $E__["map"];
      
$rest $E__["rest"];
      
$E__ = ((call(($E__["empty?"] ? $empty__QMARK__ $GLOBALS["empty__QMARK__"]), $l) != null) ? ($l) : (call(($E__["cons"] ? $cons $GLOBALS["cons"]), call($fcall(($E__["first"] ? $first $GLOBALS["first"]), $l)), call(($E__["map"] ? $map $GLOBALS["map"]), $fcall(($E__["rest"] ? $rest $GLOBALS["rest"]), $l)))));
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
_filter ($E__) {
    do {
      
$if $E__["if"];
      
$pred $E__["pred"];
      
$first $E__["first"];
      
$list $E__["list"];
      
$cons $E__["cons"];
      
$filter $E__["filter"];
      
$rest $E__["rest"];
      
$E__ = ((call($predcall(($E__["first"] ? $first $GLOBALS["first"]), $list)) != null) ? (call(($E__["cons"] ? $cons $GLOBALS["cons"]), call(($E__["first"] ? $first $GLOBALS["first"]), $list), call(($E__["filter"] ? $filter $GLOBALS["filter"]), $predcall(($E__["rest"] ? $rest $GLOBALS["rest"]), $list)))) : (call(($E__["filter"] ? $filter $GLOBALS["filter"]), $predcall(($E__["rest"] ? $rest $GLOBALS["rest"]), $list))));
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
___PLUS__ ($E__) {
    do {
      
$a $E__["a"];
      
$b $E__["b"];
      
$E__ = ($a+$b);
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
___PLUS____PLUS__ ($E__) {
    do {
      
$x $E__["x"];
      
$E__ = (1+$x);
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
___HYPHEN____HYPHEN__ ($E__) {
    do {
      
$__HYPHEN__ $E__["-"];
      
$x $E__["x"];
      
$E__ = ($x-1);
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
_a ($E__) {
    do {
      
$x $E__["x"];
      
$__AND__ $E__["&"];
      
$E__ $x;
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
PwHWi8 ($E__) {
    do {
      
$x $E__["x"];
      
$E__ = ($E__["x"] ? $x $GLOBALS["x"]);
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  function 
xOQkh6 ($E__) {
    do {
      
$λ $E__["λ"];
      
$x $E__["x"];
      
$E__ = array(array("x" => $E__["x"]), array(), "PwHWi8");
    }
    while (
is_array($E__) && $E__["qSGlk2"] == true);
    return 
$E__;
  }
  print(
"<pre>");
  
$first = array(array("get" => $E__["get"]), array("list"), "_first");
  
$rest = array(array("array_shift" => $E__["array_shift"]), array("list"), "_rest");
  
$__EQUAL__ = array(array("inline" => $E__["inline"]), array("a""b"), "___EQUAL__");
  
$empty__QMARK__ = array(array("if" => $E__["if"], "=" => $E__["="], "sizeof" => $E__["sizeof"], "true" => $E__["true"], "false" => $E__["false"]), array("list"), "_empty__QMARK__");
  
$reduce = array(array("if" => $E__["if"], "empty?" => $E__["empty?"], "recur" => $E__["recur"], "first" => $E__["first"], "list-" => $E__["list-"], "rest" => $E__["rest"]), array("fun""init""list"), "_reduce");
  
$cons = array(array("λ" => $E__["λ"], "list" => $E__["list"], "array_unshift" => $E__["array_unshift"], "list" => $E__["list"], "list" => $E__["list"], "if" => $E__["if"], "=" => $E__["="], "array" => $E__["array"]), array("a""b"), "_cons");
  
$map = array(array("if" => $E__["if"], "empty?" => $E__["empty?"], "cons" => $E__["cons"], "first" => $E__["first"], "map" => $E__["map"], "rest" => $E__["rest"]), array("f""l"), "_map");
  
$filter = array(array("if" => $E__["if"], "first" => $E__["first"], "cons" => $E__["cons"], "first" => $E__["first"], "filter" => $E__["filter"], "rest" => $E__["rest"], "filter" => $E__["filter"], "rest" => $E__["rest"]), array("pred""list"), "_filter");
  
$__PLUS__ = array(array("+" => $E__["+"]), array("a""b"), "___PLUS__");
  
$__PLUS____PLUS__ = array(array("+" => $E__["+"]), array("x"), "___PLUS____PLUS__");
  
$__HYPHEN____HYPHEN__ = array(array("-" => $E__["-"]), array("x"), "___HYPHEN____HYPHEN__");
  
$a = array(array(), array("&""x"), "_a");
  
println(call(($E__["first"] ? $first $GLOBALS["first"]), array (
  
=> 1,
    
=> 2,
    
=> 3,
    )));
  
println(call(($E__["reduce"] ? $reduce $GLOBALS["reduce"]), $__PLUS__0, array (
  
=> 1,
    
=> 2,
    
=> 3,
    )));
  
println(call(($E__["reduce"] ? $reduce $GLOBALS["reduce"]), $__PLUS__0call(($E__["map"] ? $map $GLOBALS["map"]), $__PLUS____PLUS__, array (
  
=> 1,
    
=> 2,
    
=> 3,
    ))));
  
println(call(call(array(array("λ" => $E__["λ"]), array("x"), "xOQkh6"), 10)));
  
println("foo");
  
pr("php://stdout""bar\n");
?>