No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
5 Posted Topics
I would do this with two mutually recursive functions: [code] (define (list-next? ls) (cond ((null? ls) #t) ((list? (car ls)) (atom-next? (cdr ls))) (#t #f))) (define (atom-next? ls) (cond ((null? ls) #t) ((atom? (car ls)) (list-next? (cdr ls))) (#t #f))) (define (alternating? ls) (cond ((null? ls) #t) ((list? (car ls)) …
[QUOTE=deltemis;982189][code] (define nonlat? (lambda (list) (null? list))) [/code][/quote] So, this "nonlat?" is a function that takes one parameter, which is named "list" internally. It returns the result of calling "null?" on that parameter, i.e. the list. Of course, to do that, you can as well just call "null?" instead of …
I use SBCL with SLIME in Emacs, and I think that it's a nice setup to start with. There is also LispWorks Personal Edition, which is free for personal use, but has some "nagging" limitations. However, as a commercial Lisp, it is very well maintained.
[QUOTE=taylola;820596] Split and return a list of two lists at a given element; call it (split List Element). The given element should be the head of the second list. (split ‘(2 3 4 6) 4) => ((2 3) (6)). If the element is not in the list, a list consisting …
The End.
Harleqin