Login   Register  
PHP Classes
elePHPant
Icontem

File: src/eMacros/Runtime/Arithmetic/Multiplication.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/Runtime/Arithmetic/Multiplication.php  >  Download  
File: src/eMacros/Runtime/Arithmetic/Multiplication.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:23
Size: 423 bytes
 

Contents

Class file image Download
<?php
namespace eMacros\Runtime\Arithmetic;

use 
eMacros\Runtime\GenericFunction;

class 
Multiplication extends GenericFunction {
    
/**
     * Obtains the product of all elements on a list
     * Usage: (* 4 6 2)
     * Returns: number
     * (non-PHPdoc)
     * @see \eMacros\Runtime\GenericFunction::execute()
     */
    
public function execute(array $arguments) {
        return empty(
$arguments) ? array_product($arguments);
    }
}