title: Reordering (reposition) data models based on tableview sections and rows
body: <p>Let say I have few sections which are weekdays and few rows which my workouts for the day.</p>
  
  <p>So the structure could be next</p>
  
  <pre><code>Monday section 0
  Workout 1 (row 0)
  Workout 2 (row 1)
  
  Tuesday section 1
  Workout 1 (row 0)
  Workout 2 (row 1)
  </code></pre>
  
  <p>So when I move cell between sections I want reposition my elements actually workouts in the sections.</p>
  
  <p>Currently I have data model</p>
  
  <pre><code>class Workout {
  var position: Int
  }
  </code></pre>
  
  <p>So now when I moved a cell from one section to another I need to cycle over my <code>[workouts]</code> arrays to recalculate positions in source section and in destination section.</p>
  
  <p>Maybe there is some beautiful solution such as <code>List</code> with first and last elements which I can simple re bind or any other.</p>
  
  <p>I see that there is no List <a href="https://docs.swift.org/swift-book/LanguageGuide/CollectionTypes.html" rel="nofollow noreferrer">here</a></p>