scheme equivalent to ruby debug 'p' statement -


i'm trying debug scheme code. helpful if print contents of variable or binding out.

is there equivalent 'p' statement of ruby in scheme.

in particular, i'm using racket.

there's no p equivalent, it's easy roll own.

#lang racket  (define-syntax-rule (p e)   (let ([ans e])     (printf "~a => ~a\n" (quote e) ans)     ans))  (p (+ 1 2)) 

outputs

(+ 1 2) => 3 3 

as low-tech alternative, may interested in c-c c-l keyboard shortcut in racket.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -