Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defrecord SimpleCompass [bearing]
- Compass
- (direction [_] (directions bearing))
- (left [_] (SimpleCompass. (turn bearing 3)))
- (right [_] (SimpleCompass. (turn bearing 1)))
- Object
- (toString [this] (str "[" (direction this) "]" ))
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement