A still-learning clojure-newbie (me) got a list of maps.
Each map contains one account number and other information
(e.g. ({:account 123, :type "PK", :end "01.01.2013", ...} {:account 456 :type "GK" :end "01.07.2016", ...})
Now I need a function that sequentially puts a increasing number and the account number
( like {1, 123, 2, 456 etc}
). And I didn't get it no matter what I tried.
I once learned Delphi, and it would be there like
for i :=1 to (count MYMAP)
do (put-in-a-list i AND i-th account number in the list)
inc i
Due to some restrictions I am not allowed to use functions out of the core and also I must not use "use", "ns", "require", "cycle", "time", "loop", "while", "defn", "defstruct", "defmacro", "def", "defn", "doall", "dorun", "eval", "read-string", "repeatedly", "repeat", "iterate", "import", "slurp", "spit" .
And - please excuse me if there is any bad english - it's not usual for me to ask such questions in english.
assoc
andmap-indexed
. – Joost Diepenmaat