X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=math.lisp;h=6e585baf8edbdc0c1d67f52533b9d5f674b7e202;hp=9a6862bad3f6168196b2838b69ef8eed1505f092;hb=b30c91702a68ca81402b646bd7468bfc75c5a804;hpb=d1e9c5969a0eecb7923dc350754ea9ab50417a1e diff --git a/math.lisp b/math.lisp index 9a6862b..6e585ba 100644 --- a/math.lisp +++ b/math.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Nov 2002 ;;;; -;;;; $Id: math.lisp,v 1.2 2003/04/28 16:07:42 kevin Exp $ +;;;; $Id: math.lisp,v 1.3 2003/04/28 23:51:59 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -28,3 +28,9 @@ (funcall (deriv #'sin 1d-8) x)) ;;; (sin^ pi) + +(defmacro ensure-integer (obj) + "Ensure object is an integer. If it is a string, then parse it" + `(if (stringp ,obj) + (parse-integer ,obj) + ,obj))