: Strangely enough, atom? doesn't seem to be a defined part of the
: standard. I just defined my own version and used that.
That's funny. Well I was a TA for the cs241 class last term, and they used
a vesion of scheme which is invoked at the command line "scm" or "scm -p1" and
I can't seem to be able to find it on neumann, cayley or descartes. And the
"scm" version of scheme implements an atom? operator. Well I guess I will just
stick with (symbol? )
curtis
--
''~``
( o o )
+---------------------.oooO--(_)--Oooo.----------------------+
| Curtis Cartmill |
| University of Waterloo Graduate Student (MMath) |
| Department of Computer Science |
| curtis....@uwaterloo.ca |
| .oooO |
| ( ) Oooo. |
+--------------------------\ (----( )----------------------+
\_) ) /
(_/
atom? appears to be missing in MIT scheme.
--
Gordon V. Cormack CS Dept, University of Waterloo, Canada N2L 3G1
gvco...@uwaterloo.ca http://cormack.uwaterloo.ca/cormack
Thanks,
Curtis
---SCHEME OUTPUT---
1 ]=> (atom? (car '(x y)))
;Unbound variable: atom?
;To continue, call RESTART with an option number:
; (RESTART 3) => Specify a value to use instead of atom?.
; (RESTART 2) => Define atom? to a given value.
; (RESTART 1) => Return to read-eval-print level 1.
2 error> (RESTART 1)
;Abort!
1 ]=> (symbol? (car '(x y)))
;Value: #t
1 ]=> (symbol? (car '((x y) z)))
;Value: ()
It seems "atom?" is not a standard (R4RS) function. You can roll your own
if you really need it...
--
Carl Laurence Gonsalves | "Any sufficiently advanced text editor is
clgo...@kami.com | indistinguishable from VIM."
|
http://www.undergrad.math.uwaterloo.ca/~clgonsal/