Created
September 7, 2011 17:57
-
-
Save aufrank/1201257 to your computer and use it in GitHub Desktop.
mapping trouble
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
(defrecord Node [^Float activation neighbors]) | |
(def k (Node. 0.2 '(kaet))) | |
(def ae (Node. 0.2 '(kaet))) | |
(def t (Node. 0.2 '(kaet))) | |
(def kaet | |
(Node. 0.2 '(k ae t cat))) | |
(def cat (Node. 0.2 '(kaet))) | |
(map #(:activation %) (:neighbors kaet)) | |
;;; expected (0.2 0.2 0.2 0.2) | |
;;; got (nil nil nil nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment