Thanks

On Tuesday, April 23, 2019 at 9:59:35 PM UTC+3, Dexter Lagan wrote:
>
> Hi there!
>
>   You can suppress à function’s output with (void (func ...)) like so:
>
> (void (printBoard  '((0 0 2 0) (0 0 0 0) (0 0 8 0) (0 0 0 0))))
>
> Or you can modify your original function and replace the “” by (void) like 
> so:
>
> ...
> (cond ((empty? board) (void) ) 
> ...
>
> Dexter
>
> On Apr 23, 2019, at 8:53 PM, orenpa11 <ore...@gmail.com <javascript:>> 
> wrote:
>
> 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)
> "" 
>
> How do I delete the "" ?
>
> I would like the output to be  
>
> (0 0 2 0)
> (0 0 0 0)
> (0 0 8 0)
> (0 0 0 0)
>
> Thanks
>
>
> 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...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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