close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 1228 for branches/f4grobner


Ignore:
Timestamp:
2015-06-11T13:46:11-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/utils.lisp

    r1200 r1228  
    2222(defpackage "UTILS"
    2323  (:use :cl)
    24   (:export "MAKELIST-1" "MAKELIST"))
     24  (:export "MAKELIST-1" "MAKELIST" "SUMMATION"))
    2525
    2626(in-package :utils)
     
    6363           ((> ,var ,hi) ,l)
    6464         (declare (fixnum ,var))))))
     65
     66(defmacro summation (expr (var lo hi &optional (step 1) (addition '+)))
     67  `(,addition ,@`(makelist ,expr ,var ,lo ,hi ,step)))
     68                                       
     69                               
Note: See TracChangeset for help on using the changeset viewer.