lisp.assign

lisp.assign - CSE324 SPRING 2011 Lisp Programming...

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

View Full Document Right Arrow Icon
CSE324 SPRING 2011 Lisp Programming Assignment Due : Friday, May 6 th , 2011 Write the following functions in CMU Common Lisp 20a Fedora release 1.fc13 (20A Unicode ) , running on rainbow.nmt.edu: 1- insert(X L) : a function that takes a list L and an item x and returns L after the insertion of the item x at the end of L. (10 pts) Example: (insert '4 '(1 2 3)) should return (1 2 3 4) . 2- insert-after( x y L) : a function that takes an item x (to be inserted) and an item y (used as a position), and a list L; returns L with x inserted after the first occurrence of the item y . If y is not in L, then it returns L. (10 pts) Example: (insert-after '4 '5 '(1 2 3 5 7 9 8 5 3 6)) should answer --> (1 2 3 5 4 7 9 8 5 3 6) (insert-after '4 '5 '(1 2 3)) --> returns (1 2 3) 3- my-remove(X L) : a function that takes a list L and an item x and returns L after the removal of the first occurrence of item x, otherwise if x is not in L, then it returns L. (10 pts) Example: (my-remove '4 '(1 2 3 4 5 8 4)) should return (1 2 3 5 8 4) . 4- plus-map(L1 L2)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/23/2011 for the course CSE 324 taught by Professor Soliman during the Spring '11 term at NMT.

Page1 / 4

lisp.assign - CSE324 SPRING 2011 Lisp Programming...

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

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