Login   Register  
PHP Classes
elePHPant
Icontem

File: src/eMacros/Program/ListProgram.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Emmanuel Antico  >  eMacros  >  src/eMacros/Program/ListProgram.php  >  Download  
File: src/eMacros/Program/ListProgram.php
Role: Class source
Content type: text/plain
Description: Class source
Class: eMacros
PHP LISP language interpreter
Author: By
Last change:
Date: 2014-01-13 05:17
Size: 361 bytes
 

Contents

Class file image Download
<?php
namespace eMacros\Program;

use 
eMacros\Environment\Environment;

class 
ListProgram extends Program {
    public function 
execute(Environment $env) {
        
//set arguments
        
$env->arguments array_slice(func_get_args(), 1);
        
        
$values = array();
    
        foreach (
$this->expressions as $expr) {
            
$values[] = $expr->evaluate($env);
        }
    
        return 
$values;
    }
}
?>