r5246: *** empty log message ***
[kmrcl.git] / math.lisp
index 9a6862bad3f6168196b2838b69ef8eed1505f092..682cd74027776f7dfc5a3d4346c7a0ab2be55f50 100644 (file)
--- 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.4 2003/06/06 21:59:29 kevin Exp $
 ;;;;
 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -17,7 +17,7 @@
 ;;;; *************************************************************************
 
 
-(in-package :kmrcl)
+(in-package #:kmrcl)
 
 (defun deriv (f dx)
   #'(lambda (x)
@@ -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))