lisp sol - XLISP-PLUS version 3.04 Portions Copyright(c...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 XLISP-PLUS version 3.04 Portions Copyright (c) 1988, by David Betz. Modified by Thomas Almy and others. XLISP-STAT Release 3.52.17 (Beta). Copyright (c) 1989-1999, by Luke Tierney. (defun exchange (list) (if (or (null list) (null (cdr list))) list (cons (second list) (cons (first list) ()))) ) (defun list-rotate (list) (append (last list) (butlast list 1) ) ) LIST-ROTATE > (list-rotate '(1 2 3)) (3 1 2) (defun list-rotate-left (lis) (append(rest list1) (cons (first list1) () ) )) (if (or (null list) (null (cdr list))) list LIST-ROTATE-LEFT > (LIST-ROTATE-LEFT '(1 2 3 4)) (2 3 4 1) (defun pal (lista) (if (equal lista (reverse lista)) "tes") ) PAL > (pal '(as gr as)) Entering: PAL, Argument list: ((AS GR AS)) Exiting: PAL, Value: "tes" tes > (pal '(asw gr as)) Entering: PAL, Argument list: ((ASW GR AS))
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 Exiting: PAL, Value: NIL NIL rem (defun DIVISIBLE-BY-THREE(lis1) (if (equal (rem lis1 3) 0) T ) ) DIV3 > (div3 (24)) Error: bad function - 24 Happened in: #<Subr-TOP-LEVEL-LOOP: #1cd282c>
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/17/2009 for the course EEL 5840 taught by Professor Arroyo during the Fall '08 term at University of Florida.

Page1 / 12

lisp sol - XLISP-PLUS version 3.04 Portions Copyright(c...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online