Arc Forumnew | comments | leaders | submitlogin
1 point by jmatt 6068 days ago | link | parent

there is some discussion on accessing PLT scheme's libs over here: http://www.arclanguage.com/item?id=6757

I know there is additional information somewhere in the forum on type differences when coercing data between scheme and arc - specifically '() nil (list) aren't equivalent. Worse come to worse - see the source.



4 points by almkglor 6068 days ago | link

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)))

-----