at 1:00 PM, Yingjian Ma
> wrote:
> > Thank you Stephen. The code does not work in general. I know how to do
> it
> > now.
>
> It sounds like you're beginning to learn Racket, which is cool. You
> may find the the Quick Start documentation at:
>
>htt
Thank you Stephen. The code does not work in general. I know how to do it
now.
On Thu, Jun 2, 2011 at 7:45 AM, Stephen Bloch wrote:
>
> On Jun 2, 2011, at 9:11 AM, Yingjian Ma wrote:
>
> > Here is another question. In (lambda (ls), it seems ls took the value
> from v. Ho
Hi All,
I know now that
helper v
passes v into 2nd lambda.
On Thu, Jun 2, 2011 at 6:11 AM, Yingjian Ma wrote:
> Hi Jos and ALL,
>
> The code is from website
>
> http://stackoverflow.com/questions/4175626/scheme-recursion-error
>
> I modified it. It is not about homewor
gt;
> --
> *From:* users-boun...@racket-lang.org [mailto:
> users-boun...@racket-lang.org] *On Behalf Of *Yingjian Ma
> *Sent:* 02 June 2011 08:45
> *To:* users@racket-lang.org
> *Subject:* [racket] please help to change vector to list
>
> Hi
Hi ALL,
I have this code
(define test
(lambda (x v)
(define helper
(lambda (ls)
(cond
((empty? ls) '())
((empty? (rest ls)) '())
((equal? (second ls) x) (cons (first ls) (helper (rest
ls
(else (helper (rest ls))
(helper (vecto
ent Language levels, this
> function would be illegal (and it might give you some insight into how
> this programming style works).
>
> On Wed, Jun 1, 2011 at 9:19 PM, Justin Zamora wrote:
> > On Wed, Jun 1, 2011 at 7:22 PM, Yingjian Ma
> wrote:
> >>
> >> In my
..)))])
> (add1 x))
>
> I think all your define's are supposed to come before any function
> applications.
>
> On 1 June 2011 23:24, Yingjian Ma wrote:
>
>> 1 I wrote the following code
>>
>> (define (test x)
>> (add1 x)
&g
In the first question, "else..." should be inside [].
On Wed, Jun 1, 2011 at 3:24 PM, Yingjian Ma wrote:
> 1 I wrote the following code
>
> (define (test x)
> (add1 x)
> (define (tst x)
> (cond
> [(= x 1) (add1 x)]
> else
> (+ x 2))
1 I wrote the following code
(define (test x)
(add1 x)
(define (tst x)
(cond
[(= x 1) (add1 x)]
else
(+ x 2
and got error msg as
begin (possibly implicit): no expression after a sequence of internal
definitions in: ((add1 x) (define (tst x) (cond ((= x 1) (add1 x)) else (+
Hi all,
1 I wrote
(define (p x)
(+ x 10)
(* x 10)
)
The result of (p 4) is 40. How can I display 14 and 40?
2 How can I compare two letters in Ascii order? For example, when input
are "x" and "y", the program will tell x is before y.
Thanks a lot
_
10 matches
Mail list logo