Guest User

Untitled

a guest
Sep 19th, 2010
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1.  
  2. (defn r-squared [x y]
  3. (+ (* (- 0.5 x) (- 0.5 x))
  4. (* (- 0.5 y) (- 0.5 y))))
  5.  
  6. (loop [hits 0]
  7. (let [x (rand)
  8. y (rand)
  9. something-goes-here)
  10. ;end-of-let
  11. ;nothing goes here. everything interesting must happen within the let, since if we put something here,
  12. ;then the loop would return the result of that, and not what happens inside the let.
  13. )
  14. ;end-of-loop
Advertisement
Add Comment
Please, Sign In to add comment