"orenpa11" <oren...@gmail.com>, 23.04.2019, 20:53:

> Hi
> I am using  the function    printBoard board  (DrRacket  Pretty Big) 
>
> (printBoard  '((0 0 2 0) (0 0 0 0) (0 0 8 0) (0 0 0 0)))
> and the result is 
>
> (0 0 2 0)
> (0 0 0 0)
> (0 0 8 0)
> (0 0 0 0)
> "" 

No, it is not. The *print output* is
(0 0 2 0)
(0 0 0 0)
(0 0 8 0)
(0 0 0 0)
while the *return value* is the empty string "" as
implemented in your code.

> How do I delete the "" ?

How would you change your question given the information above?

s.

> I would like the output to be  
> (0 0 2 0)
> (0 0 0 0)
> (0 0 8 0)
> (0 0 0 0)
>
> P.S. the code is 
>
> (define (buildBoard n)       ;build the started board  
>    (cond ((= n 0) '())
>          (else (cons '(0 0 0 0) (buildBoard (sub1 n))))))
>
> (define (printBoard board) ;print the board
>   (cond ((empty? board) "" ) 
>         (else (writeln(first board))
>          (printBoard (rest board)))))


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to