PHP Classes

File: src/eMacros/Runtime/Arithmetic/Addition.php

Recommend this page to a friend!
  Classes of Emmanuel Antico   eMacros   src/eMacros/Runtime/Arithmetic/Addition.php   Download  
File: src/eMacros/Runtime/Arithmetic/Addition.php
Role: Class source
Content type: text/plain
Description: Class source
Class: eMacros
PHP LISP language interpreter
Author: By
Last change:
Date: 10 years ago
Size: 385 bytes
 

Contents

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

use
eMacros\Runtime\GenericFunction;

class
Addition extends GenericFunction {
   
/**
     * Obtains the sum of all elements on a list
     * Usage: (+ 4 5 7)
     * Returns: number
     * (non-PHPdoc)
     * @see \eMacros\Runtime\GenericFunction::execute()
     */
   
public function execute(array $arguments) {
        return
array_sum($arguments);
    }
}