Arc Forumnew | comments | leaders | submitlogin
4 points by almkglor 6067 days ago | link | parent

There are a bunch of functions on scheme-side ac which help in conversions.

For functions returning booleans, there's 'tnil:

  (xdef 'exact (lambda (x) 
                 (tnil (and (integer? x) (exact? x)))))
For functions whose return value isn't used, you can use 'wrapnil:

  (xdef 'system (wrapnil system))
'ac-denil converts plain nil to 'nil, and nil at cdr positions into '().

  (define (expand-ssyntax sym)
    (ac-denil ((eval '__ssexpand) sym)))