I'm reading data from a file where each line has two values. Each line is represented by a sequence within an outer sequence representing the file.
I'd like to restructure the data into a sequence of maps for further processing.
I know how to create a map from a key set and sequence of values:
=> (defstruct entry :name :age)
=> (apply struct entry '("John" 34))
{:name "John", :age 34}
But how do I create a sequence of such maps based on a sequence of value sequences?
(map (apply struct entry) '(("John" 34) ("Lisa" 41))))
results in:
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.PersistentStructMap$Def
EDIT: Renamed symbol for clarity.