 
 (def version
   "Schema of a version.
-  
+
   A version is immutable. All updating functions return always a new version
   like operations on normal immutable data structures. The :version/parent
   references the past version of a version. One can use the parent to undo a
   change in a workbook. The parent of the initial version of a workbook is nil.
-  
+
   A version has a linked list of queries. One can use the function
   :version.fn/add-query to add a new query in front of the list."
   {:attributes


    (func :version.fn/remove-query-cell
      "Removes a query cell from a copy of the given version.
      
      Needs a tempid for the new version."
      [db tid version query-idx col-idx term-id]
      (let [seq (fn seq [l] (when l (cons (:l/head l) (seq (:l/tail l)))))

        :version/parent parent}])

    (func :version.fn/add-query
      "Creates transaction data for a new version which has one standard query
      added to the given version. Needs a tempid for the new version."
      [db tid version]
      (let [queries (:version/queries (d/entity db version))
            new-queries #db/id[:db.part/user]
