Lisp Function For Reverse All

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lisp Function For Reverse All as PDF for free.

More details

  • Words: 62
  • Pages: 1
Programming Language Homework #3 – Make reverse_all function on LISP 2004220046

이준규

# source code (defun reverse_all (lst) (cond ((null lst) lst) (t (append (reverse_all (cdr lst)) (cond ((listp (car lst)) (list (reverse_all (car lst)))) (t (list (car lst))))))))

# comment

append를 위해 atom을 list로 만들 때에 수업시간에 사용했던 (cons (car lst) nil) 대신에 (list (car lst)) 를 사용하였음.

# screen shot

Related Documents

Lisp
November 2019 13
On Lisp
May 2020 9
Tiddly Lisp
October 2019 17
Visual Lisp
December 2019 11
On Lisp
May 2020 9