Created
June 12, 2010 15:30
-
-
Save david-mcneil/435812 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defprotocol Boat | |
(go [boat ^int distance])) | |
(deftype BoatImpl [state] | |
Boat | |
(go [this distance] | |
(dosync | |
(alter state - distance)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment