[racket] Delete Second

From: Danny Yoo (dyoo at hashcollision.org)
Date: Mon Sep 17 13:42:55 EDT 2012

On Mon, Sep 17, 2012 at 11:30 AM, Ashley Fowler
<afowler2 at broncos.uncfsu.edu> wrote:
> I was just showing my first part lol...but here goes the rest of i below
>
> (define delete-second1(lambda(ls)
>                  (if(< (length ls) 1)
>                            (append(list(car ls))(cdr(cdr ls))
>                                 list(car ls))))))


There are problems still here, but you should be able to figure it out
from the error messages you're getting back from Racket.  If there's a
particular error message that you do not understand, please feel free
to ask questions.

The problems you're running into now are minor, but you need to know
how to fight them because you'll probably hit them again in future
programs.

Hints: highlight your whole program, and press TAB.  Note that this
will re-indent your program.  Watch how the indentation is slightly
screwy.  Also, put the cursor on the opening paren right before the
"append".  Notice that DrRacket will highlight what it thinks the
"part when the test is true".


Good luck!

Posted on the users mailing list.