On 11/15/2011 06:05 PM, Matthias Felleisen wrote:

I prefer to use a function that is in one of my standard libraries:

(define (tee tag v)
   (displayln `(,tag ,v))
   v)

To use it, wrap an expression like this to see what its value is:

  (tee 'find-best-strategy-1
        (find-best-strategy game-tree))

If also want to see the argument, I use two tees:

  (tee 'find-best-strategy-1
        (find-best-strategy (tee 'find-best-strategy1-arg game-tree)))

;; ---

Otherwise #; as mentioned.

Great tip! When you want to temporarily disable a particular (tee) call, do you remove it entirely? Or rename "tee" to a different function that returns v without the displayln?
_________________________________________________
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/users

Reply via email to