Skip to content

Commit

Permalink
ftr: WITH-INSTRUMENTED-FUNCTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
smithzvk committed Nov 5, 2013
1 parent f0c8a19 commit 5cb7104
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions misc.lisp
Expand Up @@ -802,3 +802,12 @@ the NEW-CAR."
(setf (symbol-function ',function) ,original)))))


(defmacro with-instrumented-functions (((function args &body instrumentation-body)
&rest functions)
&body body)
(if functions
`(with-instrumented-function (,function ,args ,@instrumentation-body)
(with-instrumented-functions ,functions
,@body))
`(with-instrumented-function (,function ,args ,@instrumentation-body)
,@body)))
3 changes: 2 additions & 1 deletion package.lisp
Expand Up @@ -115,6 +115,7 @@
;; Dynamic programming
#:defun-memoized #:defun-array-memoized #:memo-labels
#:bg
#:with-instrumented-function))
#:with-instrumented-function
#:with-instrumented-functions))

(pythonic-string-reader:enable-pythonic-string-syntax)

0 comments on commit 5cb7104

Please sign in to comment.