[plt-scheme] Re: create a board with vector

From: Mona (mona.esmaili at gmail.com)
Date: Sun Dec 6 10:23:21 EST 2009

Hi,Yes exactly I understood the all of the code but I didn't
understand Build-board.I don't know what is f.



; build-board: N (N N => boolean) => board
  ; to create a board of size n x n
> ; fill each position with indices i and j with (f i j)
> (define build-board
>  (lambda (n f)
>    (build-vector n
>                  (lambda(j)
>                      (build-vector n
>                                    (lambda (i)
>                                      (f i j)))))))

Thank you
Mona

On Dec 6, 4:01 pm, Matt Jadud <jad... at gmail.com> wrote:
> On Fri, Dec 4, 2009 at 5:30 PM, Mona <mona.esma... at gmail.com> wrote:
> > Hi,I want tocreateaboardwith size n x n but I dont know what is
> > the problem it doesn't work.
>
> It works just fine for me.
>
> Do you understand the code? In particular, do you understand "build-board"?
>
> Cheers,
> Matt
> _________________________________________________
>   For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.