code: public static <T> List<T> withEagerDefault(List<T> self, Closure init) {
          return ListWithDefault.newInstance(self, false, init);
      }
docs: Decorates a list allowing it to grow when called with a non-existent index value.
  When called with such values, the list is grown in size and a default value
  is placed in the list by calling a supplied <code>init</code> Closure. Null values
  can be stored in the list.
  <p>
  How it works: The decorated list intercepts all calls
  to <code>getAt(index)</code> and <code>get(index)</code>. If an index greater than
  or equal to the current <code>size()</code> is used, the list will grow automatically
  up to the specified index. Gaps will be filled by calling the <code>init</code> Closure.
  If generating a default value is a costly operation consider using <code>withLazyDefault</code>.
  <p>
  Example usage:
  <pre class="groovyTestCase">
  def list = [0, 1].withEagerDefault{ 42 }
  assert list[0] == 0
  assert list[1] == 1
  assert list[3] == 42   // default value
  assert list == [0, 1, 42, 42]   // gap filled with default value
  
  // illustrate using the index when generating default values
  def list2 = [5].withEagerDefault{ index -> index * index }
  assert list2[3] == 9
  assert list2 == [5, 1, 4, 9]
  
  // illustrate what happens with null values
  list2[2] = null
  assert list2[2] == null
  assert list2 == [5, 1, null, 9]
  </pre>
  
  @param self a List
  @param init a Closure with the target index as parameter which generates the default value
  @return the wrapped List
  @since 1.8.7