Advertisement
Guest User

Untitled

a guest
Feb 17th, 2021
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.19 KB | None | 0 0
  1. #lang racket
  2.  
  3. (struct robot (x y energy item))
  4.  
  5. (define (displace-robot rob dx dy)
  6.   (struct-copy robot rob [x (+ (robot-x rob) dx)]
  7.                          [y (+ (robot-y rob) dy)]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement