scheme - a strange error in racket "no expression after a sequence of internal definitions" -


i have following code:

(define (play-loop strat0 strat1 strat2 game-limit)  (define (play-loop-iter strat0 strat1 strat2 count history0 history1 history2 limit)   (cond ((= count limit) (print-out-results history0 history1 history2 limit))       (else (let ((result0 (strat0 history0 history1 history2))                   (result1 (strat1 history0 history1 history2)                   (result2 (strat2 history0 history1 history2)))               (play-loop-iter strat0 strat1 strat2 (+ 1 count)                               (extend-history result0 history0)                               (extend-history result1 history1)                               (extend-history result2 history2)                               limit)))))  (play-loop-iter strat0 strat1 strat2 0 '() '() '() game-limit))) 

when run in racket gives me following error:

begin (possibly implicit): no expression after sequence of internal definitions in:...

i seems ok there error , looked me interesting.

what problem?

thank you...

it's telling play-loop function contains definition of play-loop-iter function , no other expression in body.

it looks want call play-loop-iter part of play-loop's body, it's not - it's part of play-loop-iter's body. check parentheses.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -