Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (deftype game-map [xdim ydim contents]
- clojure.lang.IPersistentVector
- (assoc [this key val]
- (game-map. xdim ydim
- (assoc contents (+ (first key) (* (second key) ydim)) val)))
- clojure.lang.IFn
- (invoke [this col]
- (get contents (+ (first col) (* (second col) ydim)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement