daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Dec 11th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (require 2htdp/image)
  2. (require 2htdp/universe)
  3.  
  4. ;; =================
  5. ;; Constants:
  6.  
  7. (define WIDTH 800)
  8. (define HEIGHT 600)
  9.  
  10. (define SPEED 1)
  11.  
  12. (define TEXT-SIZE 12)
  13. (define TEXT-COLOUR "pink")
  14.  
  15. (define MTS (empty-scene WIDTH HEIGHT))
  16.  
  17. ;; =================
  18. ;; Data Definitions:
  19.  
  20. (define-struct number (x y))
  21. ;; Number is (make-number Integer Integer)
  22. ;; interp. A number on the screen with x and y co-ordinates
  23. (define N1 (make-number 50 100))
  24. (define N2 (make-number 0 0))
  25.  
  26. (define (fn-for-number n)
  27.   (... (number-x n)
  28.        (number-y n)))
  29.  
  30. ;; Rules used:
  31. ;; - compound
  32. ;; - atomic non-distinct (number-x n) is Integer
  33. ;; - atomic non-distinct (number-y n) is Integer
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top