Yeah “atom?” doesn’t appear in r7rs. You could probably get away with (not (pair? x)) [[ unless '() isn’t an atom - its been a while! ]]
Hopefully there wouldn’t be too many of those. 🤷♂️
Yeah “atom?” doesn’t appear in r7rs. You could probably get away with (not (pair? x)) [[ unless '() isn’t an atom - its been a while! ]]
Hopefully there wouldn’t be too many of those. 🤷♂️
I was a “lab assistant” one semester so I got to see first hand people learning Scheme. Some people really get messed up by all the parenthesis which I’m sure detracted from their experience. Therefore if you go this route, I would suggest first spending some time with him learning how to setup and use a smart code editor with parenthesis matching, sexp indentation, sexp motion commands, etc. These are of course useful for any language but critical for Scheme programming. It probably didn’t help that (at the time at least) most scheme implementations had suboptimal error messages (for example, they don’t have line/column numbers).
My previous employer did not allow non public source code on a laptop. My solution was to run emacs inside of a screen session (with screen’s C-a mapped to C-t a trick I learned from a colleague since C-t twiddle character isn’t very useful in emacs). This worked well even using terrible cellular wifi and was much better than remote desktop since the amount of data sent per keystroke will typically be quite small.
Without screen this almost works but emacs could hang sometimes when the connection got dropped which screen solves.
If (not (eq? '() #f)) then it may make sense to treat '() as non-atomic. “atomic?” would then be a cheap version of “list?”.