title: Update multiple values in a sequence
body: <p>To get a sequence with one value updated, one can use</p>
  
  <pre><code>seq.updated(index, value)
  </code></pre>
  
  <p>I want to set a new value for a range of elements. Is there a library function for that? I currently use the following function:</p>
  
  <pre><code>def updatedSlice[A](seq: List[A], ind: Iterable[Int], value: A): List[A] = 
      if (ind.isEmpty) seq
      else updatedSlice(seq.updated(ind.head, value), ind.tail, value)
  </code></pre>
  
  <p>Besides the need of writing function, this seems to be inefficient, and also works only for lists, rather than arbitrary subclasses of <code>Seq</code> and <code>String</code>s. So,</p>
  
  <ul>
  <li>is there a method that performs it?</li>
  <li>how can I parametrize the function to take (and return) some subclass of <code>Seq[A]</code>?</li>
  </ul>