[racket] Delete Second

From: Ashley Fowler (afowler2 at broncos.uncfsu.edu)
Date: Mon Sep 17 12:11:15 EDT 2012

I have to write a procedure (delete-second2 LS) that takes an arbitrary list
LS of items and returns the same list only with the second item deleted
if there is no second item, o.w. returns original input list.
I will need to use a conditional. And the tests should be as below.

(delete-second2 '())  ==>  ()
(delete-second2 '(3))  ==>  (3)
(delete-second2 '(3 7))  ==>  (3)
(delete-second2 '(a b c d))  ==>  (a c d)

I just wanna know if I am starting the procedure out right? This is what I got so far...

(define delete-second2(lambda(ls)

                (if(>ls 1)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120917/fb201dc5/attachment.html>

Posted on the users mailing list.