Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" ></meta>
        <title>IArray.scala</title>
        <script type="text/javascript" src="jquery-all.js"></script>
        <script type="text/javascript" src="linked.js"></script>
        <link rel="stylesheet" type="text/css" href="style.css" title="Style"></link>
    </head>
    <body>
        <pre>
<span class="keyword">package</span> iarray

<span class="keyword">import</span> annotation.tailrec
<span class="keyword">import</span> scalaz._
<span class="keyword">import</span> java.util.Arrays
<span class="keyword">import</span> <span title="java.util.Arrays.type">Arrays</span>.<span class="delimiter">{</span>copyOf, copyOfRange<span class="delimiter">}</span>
<span class="keyword">import</span> collection.generic.CanBuildFrom
<span class="keyword">import</span> collection.mutable.ArrayBuilder

<span class="keyword">object</span> <a title="iarray.IArray.type" id="iarray.IArray">IArray</a> <a href="#iarray.IArray" title="iarray.IArray.type" class="keyword">extends</a> <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions" title="iarray.IArrayFunctions">IArrayFunctions</a><span class="delimiter">{</span>

<span class="delimiter">}</span>

<span class="keyword">final</span> <span class="keyword">class</span> <a title="class IArray[A] extends AnyRef" id="iarray;IArray">IArray</a><span class="delimiter">[</span><a title="" id="iarray;IArray;A">A</a><span class="delimiter">]</span> <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">private</a><span class="delimiter">[</span>iarray<span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.self">self</a>: <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">)</span> <span class="delimiter">{</span>
  <span class="keyword">import</span> <a href="#iarray.IArray" title="iarray.IArray.type">IArray</a>._

  <span class="comment">/**
   * @example{{{
   * scala&gt; val x = IArray(10, 20, 30, 40)
   * scala&gt; x(2)
   * res0: Int = 30
   * }}}
   */</span>
  @inline <span class="keyword">def</span> <a title="(i: Int)A" id="iarray;IArray.apply">apply</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.apply.i">i</a>: <span title="Int">Int</span><span class="delimiter">)</span>: <a href="#iarray;IArray;A" title="A">A</a> =
    <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.apply.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;).length
   * res0: Int = 2
   * }}}
   */</span>
  @inline <span class="keyword">def</span> <a title="=&gt; Int" id="iarray;IArray.length">length</a>: <span title="Int">Int</span> =
    <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>

  @inline <span class="keyword">def</span> <a title="=&gt; Int" id="iarray;IArray.size">size</a>: <span title="Int">Int</span> =
    <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>

  <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])A" id="iarray;IArray.unsafeMaxBy">unsafeMaxBy</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unsafeMaxBy;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.unsafeMaxBy.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.unsafeMaxBy.O">O</a>: scalaz.<span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray;A" title="A">A</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.unsafeMaxBy.maxF">maxF</a> = <a href="#iarray;IArray.unsafeMaxBy.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="A" id="iarray;IArray.unsafeMaxBy.maxElem">maxElem</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unsafeMaxBy.i">i</a> = <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxBy.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.unsafeMaxBy.while$1" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="B" id="iarray;IArray.unsafeMaxBy.fx">fx</a> = <a href="#iarray;IArray.unsafeMaxBy.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxBy.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <span title="Unit" class="keyword">if</span> <span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxBy.O" title="scalaz.Order[B]">O</a>.<span title="(x: B, y: B)Boolean">greaterThan</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxBy.fx" title="B">fx</a>, <a href="#iarray;IArray.unsafeMaxBy.maxF" title="B">maxF</a><span class="delimiter">)</span><span class="delimiter">)</span> <span class="delimiter">{</span>
        <a href="#iarray;IArray.unsafeMaxBy.maxElem" title="A">maxElem</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxBy.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
        <a href="#iarray;IArray.unsafeMaxBy.maxF" title="B">maxF</a> = <a href="#iarray;IArray.unsafeMaxBy.fx" title="B">fx</a>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.unsafeMaxBy.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.unsafeMaxBy.maxElem" title="A">maxElem</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(&quot;aa&quot;, &quot;bbb&quot;, &quot;c&quot;).maxBy(_.size)
   * res0: Option[String] = Some(bbb)
   *
   * scala&gt; IArray[String]().maxBy(_.size)
   * res1: Option[String] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])Option[A]" id="iarray;IArray.maxBy">maxBy</a><span class="delimiter">[</span><a title="" id="iarray;IArray.maxBy;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.maxBy.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.maxBy.O">O</a>: scalaz.<span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxBy" title="(f: A =&gt; B)(implicit O: scalaz.Order[B])A">unsafeMaxBy</a><a href="#iarray;IArray.maxBy.O" title="scalaz.Order[B]" class="delimiter">(</a><a href="#iarray;IArray.maxBy.f" title="A =&gt; B">f</a><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])A" id="iarray;IArray.unsafeMinBy">unsafeMinBy</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unsafeMinBy;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.unsafeMinBy.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.unsafeMinBy.O">O</a>: scalaz.<span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray;A" title="A">A</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.unsafeMinBy.minF">minF</a> = <a href="#iarray;IArray.unsafeMinBy.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="A" id="iarray;IArray.unsafeMinBy.minElem">minElem</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unsafeMinBy.i">i</a> = <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinBy.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.unsafeMinBy.while$2" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="B" id="iarray;IArray.unsafeMinBy.fx">fx</a> = <a href="#iarray;IArray.unsafeMinBy.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinBy.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <span title="Unit" class="keyword">if</span> <span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinBy.O" title="scalaz.Order[B]">O</a>.<span title="(x: B, y: B)Boolean">lessThan</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinBy.fx" title="B">fx</a>, <a href="#iarray;IArray.unsafeMinBy.minF" title="B">minF</a><span class="delimiter">)</span><span class="delimiter">)</span> <span class="delimiter">{</span>
        <a href="#iarray;IArray.unsafeMinBy.minElem" title="A">minElem</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinBy.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
        <a href="#iarray;IArray.unsafeMinBy.minF" title="B">minF</a> = <a href="#iarray;IArray.unsafeMinBy.fx" title="B">fx</a>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.unsafeMinBy.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.unsafeMinBy.minElem" title="A">minElem</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(&quot;aa&quot;, &quot;bbb&quot;, &quot;c&quot;).minBy(_.size)
   * res0: Option[String] = Some(c)
   *
   * scala&gt; IArray[String]().minBy(_.size)
   * res1: Option[String] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])Option[A]" id="iarray;IArray.minBy">minBy</a><span class="delimiter">[</span><a title="" id="iarray;IArray.minBy;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.minBy.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.minBy.O">O</a>: scalaz.<span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinBy" title="(f: A =&gt; B)(implicit O: scalaz.Order[B])A">unsafeMinBy</a><a href="#iarray;IArray.minBy.O" title="scalaz.Order[B]" class="delimiter">(</a><a href="#iarray;IArray.minBy.f" title="A =&gt; B">f</a><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="(implicit O: scalaz.Order[A])A" id="iarray;IArray.unsafeMax">unsafeMax</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[A]" id="iarray;IArray.unsafeMax.O">O</a>: <span title="scalaz.Order[A]">Order</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray;A" title="A">A</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unsafeMax.i">i</a> = <span title="Int(1)" class="int">1</span>
    <span class="keyword">var</span> <a title="A" id="iarray;IArray.unsafeMax.a">a</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMax.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span><a href="#iarray;IArray.unsafeMax.while$3" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.unsafeMax.a" title="A">a</a> = <a href="#iarray;IArray.unsafeMax.O" title="scalaz.Order[A]">O</a>.<span title="(x: A, y: A)A">max</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMax.a" title="A">a</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMax.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.unsafeMax.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.unsafeMax.a" title="A">a</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(20, 30, 10).max
   * res0: Option[Int] = Some(30)
   *
   * scala&gt; IArray[Int]().max
   * res1: Option[Int] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(implicit O: scalaz.Order[A])Option[A]" id="iarray;IArray.max">max</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[A]" id="iarray;IArray.max.O">O</a>: <span title="scalaz.Order[A]">Order</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span> <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMax" title="(implicit O: scalaz.Order[A])A">unsafeMax</a><span class="delimiter">)</span>

  <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="(implicit O: scalaz.Order[A])A" id="iarray;IArray.unsafeMin">unsafeMin</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[A]" id="iarray;IArray.unsafeMin.O">O</a>: <span title="scalaz.Order[A]">Order</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray;A" title="A">A</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unsafeMin.i">i</a> = <span title="Int(1)" class="int">1</span>
    <span class="keyword">var</span> <a title="A" id="iarray;IArray.unsafeMin.a">a</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMin.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span><a href="#iarray;IArray.unsafeMin.while$4" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.unsafeMin.a" title="A">a</a> = <a href="#iarray;IArray.unsafeMin.O" title="scalaz.Order[A]">O</a>.<span title="(x: A, y: A)A">min</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMin.a" title="A">a</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMin.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.unsafeMin.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.unsafeMin.a" title="A">a</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(20, 30, 10).min
   * res0: Option[Int] = Some(10)
   *
   * scala&gt; IArray[Int]().min
   * res1: Option[Int] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(implicit O: scalaz.Order[A])Option[A]" id="iarray;IArray.min">min</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[A]" id="iarray;IArray.min.O">O</a>: <span title="scalaz.Order[A]">Order</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span> <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMin" title="(implicit O: scalaz.Order[A])A">unsafeMin</a><span class="delimiter">)</span>

  <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])B" id="iarray;IArray.unsafeMaxOf">unsafeMaxOf</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unsafeMaxOf;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.unsafeMaxOf.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.unsafeMaxOf.O">O</a>: <span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray.unsafeMaxOf;B" title="B">B</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.unsafeMaxOf.a">a</a> = <a href="#iarray;IArray.unsafeMaxOf.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unsafeMaxOf.i">i</a> = <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxOf.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.unsafeMaxOf.while$5" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.unsafeMaxOf.a" title="B">a</a> = <a href="#iarray;IArray.unsafeMaxOf.O" title="scalaz.Order[B]">O</a>.<span title="(x: B, y: B)B">max</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxOf.a" title="B">a</a>, <a href="#iarray;IArray.unsafeMaxOf.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxOf.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.unsafeMaxOf.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.unsafeMaxOf.a" title="B">a</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(20, 30, 10).maxOf(- _)
   * res0: Option[Int] = Some(-10)
   *
   * scala&gt; IArray[Int]().maxOf(- _)
   * res1: Option[Int] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])Option[B]" id="iarray;IArray.maxOf">maxOf</a><span class="delimiter">[</span><a title="" id="iarray;IArray.maxOf;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.maxOf.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.maxOf.O">O</a>: <span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[B]">Option</span><span class="delimiter">[</span>B<span class="delimiter">]</span> =
    <span title="Option[B]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span> <span title="(x: B)Some[B]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMaxOf" title="(f: A =&gt; B)(implicit O: scalaz.Order[B])B">unsafeMaxOf</a><a href="#iarray;IArray.maxOf.O" title="scalaz.Order[B]" class="delimiter">(</a><a href="#iarray;IArray.maxOf.f" title="A =&gt; B">f</a><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])B" id="iarray;IArray.unsafeMinOf">unsafeMinOf</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unsafeMinOf;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.unsafeMinOf.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.unsafeMinOf.O">O</a>: <span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray.unsafeMinOf;B" title="B">B</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.unsafeMinOf.a">a</a> = <a href="#iarray;IArray.unsafeMinOf.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unsafeMinOf.i">i</a> = <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinOf.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.unsafeMinOf.while$6" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.unsafeMinOf.a" title="B">a</a> = <a href="#iarray;IArray.unsafeMinOf.O" title="scalaz.Order[B]">O</a>.<span title="(x: B, y: B)B">min</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinOf.a" title="B">a</a>, <a href="#iarray;IArray.unsafeMinOf.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinOf.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.unsafeMinOf.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.unsafeMinOf.a" title="B">a</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(20, 30, 10).minOf(- _)
   * res0: Option[Int] = Some(-30)
   *
   * scala&gt; IArray[Int]().minOf(- _)
   * res1: Option[Int] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])Option[B]" id="iarray;IArray.minOf">minOf</a><span class="delimiter">[</span><a title="" id="iarray;IArray.minOf;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.minOf.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.minOf.O">O</a>: <span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[B]">Option</span><span class="delimiter">[</span>B<span class="delimiter">]</span> =
    <span title="Option[B]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span> <span title="(x: B)Some[B]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.unsafeMinOf" title="(f: A =&gt; B)(implicit O: scalaz.Order[B])B">unsafeMinOf</a><a href="#iarray;IArray.minOf.O" title="scalaz.Order[B]" class="delimiter">(</a><a href="#iarray;IArray.minOf.f" title="A =&gt; B">f</a><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5).find(_ &gt; 3)
   * res0: Option[Int] = Some(4)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)Option[A]" id="iarray;IArray.find">find</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.find.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.find.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.find.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.find.while$7" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.find.f" title="(v1: A)Boolean">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.find.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.find.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.find.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="None.type">None</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5).findRight(_ &lt; 4)
   * res0: Option[Int] = Some(3)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)Option[A]" id="iarray;IArray.findRight">findRight</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.findRight.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.findRight.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><span title="Int(0)" class="int">0</span> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.findRight.i" title="Int">i</a><span class="delimiter">)</span><a href="#iarray;IArray.findRight.while$8" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.findRight.f" title="(v1: A)Boolean">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.findRight.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.findRight.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.findRight.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="None.type">None</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; val a = IArray(1, 2, 3, 4)
   * scala&gt; a.exists(_ % 3 == 0)
   * res0: Boolean = true
   *
   * scala&gt; a.exists(_ &lt;= 0)
   * res1: Boolean = false
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)Boolean" id="iarray;IArray.exists">exists</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.exists.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="Boolean">Boolean</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.exists.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.exists.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.exists.while$9" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.exists.f" title="(v1: A)Boolean">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.exists.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <span title="Boolean(true)" class="keyword">true</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.exists.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="Boolean(false)" class="keyword">false</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; val a = IArray(1, 2, 3, 4)
   * scala&gt; a.forall(_ &lt;= 4)
   * res0: Boolean = true
   *
   * scala&gt; a.forall(_ % 4 &lt; 3)
   * res1: Boolean = false
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)Boolean" id="iarray;IArray.forall">forall</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.forall.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="Boolean">Boolean</span> =
    <a href="#iarray;IArray.indexNot" title="(f: A =&gt; Boolean)Int">indexNot</a><span class="delimiter">(</span><a href="#iarray;IArray.forall.f" title="A =&gt; Boolean">f</a><span class="delimiter">)</span> <span title="(x: Int)Boolean">&lt;</span> <span title="Int(0)" class="int">0</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5).toIterator.filter(_ % 2 == 0).toList
   * res0: List[Int] = List(2, 4)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Iterator[A]" id="iarray;IArray.toIterator">toIterator</a>: <span title="Iterator[A]">Iterator</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.IArrayIterator[A]" class="keyword">new</span> <a href="IArrayIterator.scala.html#iarray;IArrayIterator" title="iarray.IArrayIterator[A]">IArrayIterator</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).toIList
   * res0: scalaz.IList[Int] = [1,2,3]
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; scalaz.IList[A]" id="iarray;IArray.toIList">toIList</a>: <span title="scalaz.IList[A]">IList</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.toIList.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span class="keyword">var</span> <a title="scalaz.IList[A]" id="iarray;IArray.toIList.acc">acc</a> = <span title="scalaz.IList.type">IList</span>.<span title="[A]=&gt; scalaz.IList[A]">empty</span><span title="scalaz.IList[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><span title="Int(0)" class="int">0</span> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.toIList.i" title="Int">i</a><span class="delimiter">)</span><a href="#iarray;IArray.toIList.while$10" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.toIList.acc" title="scalaz.IList[A]">acc</a> = <span title="(head: A, tail: scalaz.IList[A])scalaz.ICons[A]">ICons</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.toIList.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.toIList.acc" title="scalaz.IList[A]">acc</a><span class="delimiter">)</span>
      <a href="#iarray;IArray.toIList.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.toIList.acc" title="scalaz.IList[A]">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).reverseList
   * res0: List[Int] = List(3, 2, 1)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; List[A]" id="iarray;IArray.reverseList">reverseList</a>: <span title="List[A]">List</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.reverseList.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">var</span> <a title="List[A]" id="iarray;IArray.reverseList.acc">acc</a>: <span title="List[A]">List</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span title="scala.collection.immutable.Nil.type">Nil</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.reverseList.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.reverseList.while$11" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.reverseList.acc" title="List[A]">acc</a> = <span title="::[A]" class="keyword">new</span> <span title="::[A]">::</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.reverseList.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.reverseList.acc" title="List[A]">acc</a><span class="delimiter">)</span>
      <a href="#iarray;IArray.reverseList.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.reverseList.acc" title="List[A]">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).reverseIList
   * res0: scalaz.IList[Int] = [3,2,1]
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; scalaz.IList[A]" id="iarray;IArray.reverseIList">reverseIList</a>: <span title="scalaz.IList[A]">IList</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.reverseIList.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">var</span> <a title="scalaz.IList[A]" id="iarray;IArray.reverseIList.acc">acc</a> = <span title="scalaz.IList.type">IList</span>.<span title="[A]=&gt; scalaz.IList[A]">empty</span><span title="scalaz.IList[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.reverseIList.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.reverseIList.while$12" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.reverseIList.acc" title="scalaz.IList[A]">acc</a> = <span title="(head: A, tail: scalaz.IList[A])scalaz.ICons[A]">ICons</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.reverseIList.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.reverseIList.acc" title="scalaz.IList[A]">acc</a><span class="delimiter">)</span>
      <a href="#iarray;IArray.reverseIList.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.reverseIList.acc" title="scalaz.IList[A]">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).reverseArray
   * res0: Array[Int] = Array(3, 2, 1)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(implicit A: scala.reflect.ClassTag[A])Array[A]" id="iarray;IArray.reverseArray">reverseArray</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scala.reflect.ClassTag[A]" id="iarray;IArray.reverseArray.A">A</a>: reflect.<span title="scala.reflect.ClassTag[A]">ClassTag</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Array[A]">Array</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Array[A]" id="iarray;IArray.reverseArray.array">array</a> = <a href="#iarray;IArray.reverseArray.A" title="(len: Int)Array[A]" class="keyword">new</a> Array<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.reverseArray.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.reverseArray.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.reverseArray.while$13" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.reverseArray.array" title="(i: Int, x: A)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <a href="#iarray;IArray.reverseArray.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.reverseArray.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
      <a href="#iarray;IArray.reverseArray.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.reverseArray.array" title="Array[A]">array</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).toList
   * res0: List[Int] = List(1, 2, 3)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; List[A]" id="iarray;IArray.toList">toList</a>: <span title="List[A]">List</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.toList.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span class="keyword">var</span> <a title="List[A]" id="iarray;IArray.toList.acc">acc</a>: <span title="List[A]">List</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span title="scala.collection.immutable.Nil.type">Nil</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><span title="Int(0)" class="int">0</span> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.toList.i" title="Int">i</a><span class="delimiter">)</span><a href="#iarray;IArray.toList.while$14" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.toList.acc" title="List[A]">acc</a> = <span title="::[A]" class="keyword">new</span> <span title="::[A]">::</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.toList.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.toList.acc" title="List[A]">acc</a><span class="delimiter">)</span>
      <a href="#iarray;IArray.toList.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.toList.acc" title="List[A]">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.NonEmptyList
   * scala&gt; IArray(1, 2, 3).toNel
   * res0: Option[NonEmptyList[Int]] = Some(NonEmptyList(1, 2, 3))
   *
   * scala&gt; IArray[Int]().toNel
   * res1: Option[NonEmptyList[Int]] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Option[scalaz.NonEmptyList[A]]" id="iarray;IArray.toNel">toNel</a>: <span title="Option[scalaz.NonEmptyList[A]]">Option</span><span class="delimiter">[</span>NonEmptyList<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span> =
    <span title="Option[scalaz.NonEmptyList[A]]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span>
      <span title="None.type">None</span>
    <span class="keyword">else</span>
      <span title="(x: scalaz.NonEmptyList[A])Some[scalaz.NonEmptyList[A]]">Some</span><span class="delimiter">(</span><span title="scalaz.NonEmptyList.type">NonEmptyList</span>.<span title="(h: A, t: List[A])scalaz.NonEmptyList[A]">nel</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.toList" title="=&gt; List[A]">toList</a>.<span title="=&gt; List[A]">tail</span><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).toIArray1
   * res0: Option[IArray1[Int]] = Some(IArray1(1, 2, 3))
   *
   * scala&gt; IArray[Int]().toIArray1
   * res1: Option[IArray1[Int]] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Option[iarray.IArray1[A]]" id="iarray;IArray.toIArray1">toIArray1</a>: <span title="Option[iarray.IArray1[A]]">Option</span><span class="delimiter">[</span>IArray1<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span> =
    <span title="Option[iarray.IArray1[A]]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span>
      <span title="None.type">None</span>
    <span class="keyword">else</span>
      <span title="(x: iarray.IArray1[A])Some[iarray.IArray1[A]]">Some</span><span class="delimiter">(</span><a href="IArray1.scala.html#iarray;IArray1" title="(head: A, tail: iarray.IArray[A])iarray.IArray1[A]">IArray1</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <span title="Int(1)" class="int">1</span>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).zipperEnd.map(_.modify(_ + 10).toStream.toList)
   * res0: Option[List[Int]] = Some(List(1, 2, 13))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Option[scalaz.Zipper[A]]" id="iarray;IArray.zipperEnd">zipperEnd</a>: <span title="Option[scalaz.Zipper[A]]">Option</span><span class="delimiter">[</span>Zipper<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span> =
    <span title="Option[scalaz.Zipper[A]]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.zipperEnd.i">i</a> = <span title="Int(0)" class="int">0</span>
      <span class="keyword">var</span> <a title="Stream[A]" id="iarray;IArray.zipperEnd.acc">acc</a>: <span title="Stream[A]">Stream</span><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span title="=&gt; collection.immutable.Stream.type">Stream</span>.<span title="Stream.Empty.type">Empty</span>
      <span class="keyword">val</span> <a title="Int" id="iarray;IArray.zipperEnd.len">len</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.zipperEnd.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.zipperEnd.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.zipperEnd.while$15" title="()Unit" class="delimiter">{</a>
        <span class="keyword">val</span> <a title="Stream[A]" id="iarray;IArray.zipperEnd.x">x</a> = <a href="#iarray;IArray.zipperEnd.acc" title="Stream[A]">acc</a>
        <a href="#iarray;IArray.zipperEnd.acc" title="Stream[A]">acc</a> = <span title="Stream.Cons[A]" class="keyword">new</span> Stream.<span title="Stream.Cons[A]">Cons</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipperEnd.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.zipperEnd.x" title="Stream[A]">x</a><span class="delimiter">)</span>
        <a href="#iarray;IArray.zipperEnd.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="(x: scalaz.Zipper[A])Some[scalaz.Zipper[A]]">Some</span><span class="delimiter">(</span><span title="(lefts: Stream[A], focus: A, rights: Stream[A])scalaz.Zipper[A]">Zipper</span><span class="delimiter">(</span><a href="#iarray;IArray.zipperEnd.acc" title="Stream[A]">acc</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipperEnd.len" title="Int">len</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <span title="=&gt; collection.immutable.Stream.type">Stream</span>.<span title="Stream.Empty.type">Empty</span><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).oneAnd
   * res0: Option[scalaz.OneAnd[IArray, Int]] = Some(OneAnd(1,IArray(2, 3)))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Option[scalaz.OneAnd[iarray.IArray,A]]" id="iarray;IArray.oneAnd">oneAnd</a>: <span title="Option[scalaz.OneAnd[iarray.IArray,A]]">Option</span><span class="delimiter">[</span>OneAnd<span class="delimiter">[</span>IArray, A<span class="delimiter">]</span><span class="delimiter">]</span> =
    <span title="Option[scalaz.OneAnd[iarray.IArray,A]]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span>
      <span title="None.type">None</span>
    <span class="keyword">else</span>
      <span title="(x: scalaz.OneAnd[iarray.IArray,A])Some[scalaz.OneAnd[iarray.IArray,A]]">Some</span><span class="delimiter">(</span><span title="(head: A, tail: iarray.IArray[A])scalaz.OneAnd[iarray.IArray,A]">OneAnd</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.dropL" title="(n: Int)iarray.IArray[A]">dropL</a><span class="delimiter">(</span><span title="Int(1)" class="int">1</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).toArray
   * res0: Array[Int] = Array(1, 2, 3)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(implicit A: scala.reflect.ClassTag[A])Array[A]" id="iarray;IArray.toArray">toArray</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scala.reflect.ClassTag[A]" id="iarray;IArray.toArray.A">A</a>: reflect.<span title="scala.reflect.ClassTag[A]">ClassTag</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Array[A]">Array</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Array[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.toArray.A" title="scala.reflect.ClassTag[A]">A</a>.<span title="=&gt; Class[_]">runtimeClass</span>.<span title="()Boolean">isPrimitive</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span class="keyword">val</span> <a title="Array[A]" id="iarray;IArray.toArray.array">array</a> = <a href="#iarray;IArray.toArray.A" title="(len: Int)Array[A]" class="keyword">new</a> Array<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.toArray.i">i</a> = <span title="Int(0)" class="int">0</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.toArray.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.toArray.while$16" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.toArray.array" title="(i: Int, x: A)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.toArray.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.toArray.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
        <a href="#iarray;IArray.toArray.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.toArray.array" title="Array[A]">array</a>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="(x$1: Array[AnyRef], x$2: Int)Array[AnyRef]">copyOf</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="Array[A]" class="delimiter">[</span><span title="Array[A]">Array</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2).isEmpty
   * res0: Boolean = false
   *
   * scala&gt; IArray[Int](1, 2).dropL(10).isEmpty
   * res1: Boolean = true
   * }}}
   */</span>
  @inline <span class="keyword">def</span> <a title="=&gt; Boolean" id="iarray;IArray.isEmpty">isEmpty</a>: <span title="Boolean">Boolean</span> =
    <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2).nonEmpty
   * res0: Boolean = true
   *
   * scala&gt; IArray[Int](1, 2).dropL(10).nonEmpty
   * res1: Boolean = false
   * }}}
   */</span>
  @inline <span class="keyword">def</span> <a title="=&gt; Boolean" id="iarray;IArray.nonEmpty">nonEmpty</a>: <span title="Boolean">Boolean</span> =
    <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">!=</span> <span title="Int(0)" class="int">0</span>

  <span class="comment">// unsafe</span>
  @inline <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="=&gt; A" id="iarray;IArray.head">head</a>: <a href="#iarray;IArray;A" title="A">A</a> =
    <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>

  <span class="comment">// unsafe</span>
  @inline <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="=&gt; iarray.IArray[A]" id="iarray;IArray.tail">tail</a>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <a href="#iarray;IArray.dropL" title="(n: Int)iarray.IArray[A]">dropL</a><span class="delimiter">(</span><span title="Int(1)" class="int">1</span><span class="delimiter">)</span>


  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(10, 20, 30).headOption
   * res0: Option[Int] = Some(10)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Option[A]" id="iarray;IArray.headOption">headOption</a>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span> <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">)</span>

  @inline <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="=&gt; A" id="iarray;IArray.unsafeLast">unsafeLast</a>: <a href="#iarray;IArray;A" title="A">A</a> =
    <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(10, 20, 30).lastOption
   * res0: Option[Int] = Some(30)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Option[A]" id="iarray;IArray.lastOption">lastOption</a>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span> <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.length" title="=&gt; Int">length</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(10, 20, 30).tailOption
   * res0: Option[IArray[Int]] = Some(IArray(20, 30))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Option[iarray.IArray[A]]" id="iarray;IArray.tailOption">tailOption</a>: <span title="Option[iarray.IArray[A]]">Option</span><span class="delimiter">[</span>IArray<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span> =
    <span title="Option[iarray.IArray[A]]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span> <span title="(x: iarray.IArray[A])Some[iarray.IArray[A]]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.dropL" title="(n: Int)iarray.IArray[A]">dropL</a><span class="delimiter">(</span><span title="Int(1)" class="int">1</span><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(10, 20, 30).initOption
   * res0: Option[IArray[Int]] = Some(IArray(10, 20))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; Option[iarray.IArray[A]]" id="iarray;IArray.initOption">initOption</a>: <span title="Option[iarray.IArray[A]]">Option</span><span class="delimiter">[</span>IArray<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span> =
    <span title="Option[iarray.IArray[A]]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span> <span title="(x: iarray.IArray[A])Some[iarray.IArray[A]]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.dropR" title="(n: Int)iarray.IArray[A]">dropR</a><span class="delimiter">(</span><span title="Int(1)" class="int">1</span><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(from: Int, until: Int)iarray.IArray[A]" id="iarray;IArray.slice">slice</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.slice.from">from</a>: <span title="Int">Int</span>, <a title="Int" id="iarray;IArray.slice.until">until</a>: <span title="Int">Int</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.slice.until" title="Int">until</a> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.slice.from" title="Int">from</a> <span title="(x: Boolean)Boolean">||</span> <a href="#iarray;IArray.slice.until" title="Int">until</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span> <span title="(x: Boolean)Boolean">||</span> <a href="#iarray;IArray.slice.from" title="Int">from</a> <span title="(x: Int)Boolean">&gt;=</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.slice.from" title="Int">from</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span> <span title="(x: Boolean)Boolean">&amp;&amp;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.slice.until" title="Int">until</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">max</span><span class="delimiter">(</span><a href="#iarray;IArray.slice.from" title="Int">from</a>, <span title="Int(0)" class="int">0</span><span class="delimiter">)</span>, <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">min</span><span class="delimiter">(</span><a href="#iarray;IArray.slice.until" title="Int">until</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).reverse
   * res0: IArray[Int] = IArray(3, 2, 1)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; iarray.IArray[A]" id="iarray;IArray.reverse">reverse</a>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.reverse.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.reverse.len">len</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.reverse.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.reverse.len" title="Int">len</a><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.reverse.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.reverse.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.reverse.while$17" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.reverse.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.reverse.len" title="Int">len</a> <span title="(x: Int)Int">-</span> <a href="#iarray;IArray.reverse.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.reverse.i" title="Int">i</a><span class="delimiter">)</span>
      <a href="#iarray;IArray.reverse.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.reverse.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3) reverse_::: IArray(10, 11, 12)
   * res0: IArray[Int] = IArray(3, 2, 1, 10, 11, 12)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(prefix: iarray.IArray[A])iarray.IArray[A]" id="iarray;IArray.reverse_:::">reverse_:::</a><span class="delimiter">(</span><a title="iarray.IArray[A]" id="iarray;IArray.reverse_:::.prefix">prefix</a>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.reverse_:::.prefix" title="iarray.IArray[A]">prefix</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.reverse_:::.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">+</span> <a href="#iarray;IArray.reverse_:::.prefix" title="iarray.IArray[A]">prefix</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.reverse_:::.i">i</a> = <span title="Int(0)" class="int">0</span>
      <span class="keyword">val</span> <a title="Int" id="iarray;IArray.reverse_:::.len">len</a> = <a href="#iarray;IArray.reverse_:::.prefix" title="iarray.IArray[A]">prefix</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.reverse_:::.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.reverse_:::.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.reverse_:::.while$18" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.reverse_:::.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.reverse_:::.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.reverse_:::.prefix" title="iarray.IArray[A]">prefix</a>.<a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.reverse_:::.len" title="Int">len</a> <span title="(x: Int)Int">-</span> <a href="#iarray;IArray.reverse_:::.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.reverse_:::.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="System.type">System</span>.<span title="(x$1: Any, x$2: Int, x$3: Any, x$4: Int, x$5: Int)Unit">arraycopy</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <span title="Int(0)" class="int">0</span>, <a href="#iarray;IArray.reverse_:::.array" title="Array[AnyRef]">array</a>, <a href="#iarray;IArray.reverse_:::.len" title="Int">len</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.reverse_:::.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5, 6, 7).count(_ % 2 == 1)
   * res0: Int = 4
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)Int" id="iarray;IArray.count">count</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.count.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="Int">Int</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.count.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.count.n">n</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.count.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.count.while$19" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.count.f" title="(v1: A)Boolean">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.count.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <a href="#iarray;IArray.count.n" title="Int">n</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.count.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.count.n" title="Int">n</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(10, 20, 30, 40, 50, 60, 70).splitAt(5)
   * res0: (IArray[Int], IArray[Int]) = (IArray(10, 20, 30, 40, 50),IArray(60, 70))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(n: Int)(iarray.IArray[A], iarray.IArray[A])" id="iarray;IArray.splitAt">splitAt</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.splitAt.n">n</a>: <span title="Int">Int</span><span class="delimiter">)</span>: <span title="(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span>IArray<span class="delimiter">[</span>A<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span> =
    <span title="(iarray.IArray[A], iarray.IArray[A])" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.splitAt.n" title="Int">n</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="(_1: iarray.IArray[A], _2: iarray.IArray[A])(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span><a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a><span class="delimiter">)</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="(iarray.IArray[A], iarray.IArray[A])" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.splitAt.n" title="Int">n</a> <span title="(x: Int)Boolean">&gt;=</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="(_1: iarray.IArray[A], _2: iarray.IArray[A])(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span><a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>, <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="(_1: iarray.IArray[A], _2: iarray.IArray[A])(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span><span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int)Array[AnyRef]">copyOf</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.splitAt.n" title="Int">n</a><span class="delimiter">)</span><span class="delimiter">)</span>, <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.splitAt.n" title="Int">n</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5, 6, 7).takeWhileL(_ &lt; 5)
   * res0: IArray[Int] = IArray(1, 2, 3, 4)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)iarray.IArray[A]" id="iarray;IArray.takeWhileL">takeWhileL</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.takeWhileL.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.takeWhileL.len">len</a> = <a href="#iarray;IArray.indexNot" title="(f: A =&gt; Boolean)Int">indexNot</a><span class="delimiter">(</span><a href="#iarray;IArray.takeWhileL.f" title="A =&gt; Boolean">f</a><span class="delimiter">)</span>
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.takeWhileL.len" title="Int">len</a> <span title="(x: Int)Boolean">&lt;</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.takeWhileL.len" title="Int">len</a> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int)Array[AnyRef]">copyOf</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.takeWhileL.len" title="Int">len</a><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5, 6, 7).takeWhileR(_ &gt; 2)
   * res0: IArray[Int] = IArray(3, 4, 5, 6, 7)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)iarray.IArray[A]" id="iarray;IArray.takeWhileR">takeWhileR</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.takeWhileR.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.takeWhileR.len">len</a> = <a href="#iarray;IArray.lastIndex" title="(f: A =&gt; Boolean)Int">lastIndex</a><span class="delimiter">(</span><a href="#iarray;IArray.takeWhileR.f" title="A =&gt; Boolean">f</a><span class="delimiter">)</span> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span>
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.takeWhileR.len" title="Int">len</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.takeWhileR.len" title="Int">len</a> <span title="(x: Int)Boolean">==</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.takeWhileR.len" title="Int">len</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5, 6, 7).dropWhileL(_ &lt; 4)
   * res0: IArray[Int] = IArray(4, 5, 6, 7)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)iarray.IArray[A]" id="iarray;IArray.dropWhileL">dropWhileL</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.dropWhileL.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.dropWhileL.len">len</a> = <a href="#iarray;IArray.indexNot" title="(f: A =&gt; Boolean)Int">indexNot</a><span class="delimiter">(</span><a href="#iarray;IArray.dropWhileL.f" title="A =&gt; Boolean">f</a><span class="delimiter">)</span>
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.dropWhileL.len" title="Int">len</a> <span title="(x: Int)Boolean">&lt;</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.dropWhileL.len" title="Int">len</a> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.dropWhileL.len" title="Int">len</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5, 6, 7).dropWhileR(_ &gt; 5)
   * res0: IArray[Int] = IArray(1, 2, 3, 4, 5)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)iarray.IArray[A]" id="iarray;IArray.dropWhileR">dropWhileR</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.dropWhileR.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.dropWhileR.len">len</a> = <a href="#iarray;IArray.lastIndex" title="(f: A =&gt; Boolean)Int">lastIndex</a><span class="delimiter">(</span><a href="#iarray;IArray.dropWhileR.f" title="A =&gt; Boolean">f</a><span class="delimiter">)</span> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span>
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.dropWhileR.len" title="Int">len</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.dropWhileR.len" title="Int">len</a> <span title="(x: Int)Boolean">==</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int)Array[AnyRef]">copyOf</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.dropWhileR.len" title="Int">len</a><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;, &quot;f&quot;).takeR(4)
   * res0: IArray[String] = IArray(c, d, e, f)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(n: Int)iarray.IArray[A]" id="iarray;IArray.takeR">takeR</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.takeR.n">n</a>: <span title="Int">Int</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.takeR.n" title="Int">n</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span> <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.takeR.n" title="Int">n</a> <span title="(x: Int)Boolean">&gt;=</span> <a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span> <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.length" title="=&gt; Int">length</a> <span title="(x: Int)Int">-</span> <a href="#iarray;IArray.takeR.n" title="Int">n</a>, <a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;, &quot;f&quot;).takeL(2)
   * res0: IArray[String] = IArray(a, b)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(n: Int)iarray.IArray[A]" id="iarray;IArray.takeL">takeL</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.takeL.n">n</a>: <span title="Int">Int</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.takeL.n" title="Int">n</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span> <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.takeL.n" title="Int">n</a> <span title="(x: Int)Boolean">&gt;=</span> <a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span> <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int)Array[AnyRef]">copyOf</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.takeL.n" title="Int">n</a><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.\&amp;/
   * scala&gt; IArray(1, 2, 3) align IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;)
   * res0: IArray[Int \&amp;/ String] = IArray(Both(1,a), Both(2,b), Both(3,c), That(d), That(e))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](b: iarray.IArray[B])iarray.IArray[scalaz.\&amp;/[A,B]]" id="iarray;IArray.align">align</a><span class="delimiter">[</span><a title="" id="iarray;IArray.align;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="iarray.IArray[B]" id="iarray;IArray.align.b">b</a>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[scalaz.\&amp;/[A,B]]">IArray</a><span class="delimiter">[</span>A \&amp;/ B<span class="delimiter">]</span> =
    <a href="#iarray;IArray.alignWith" title="(that: iarray.IArray[B])(f: scalaz.\&amp;/[A,B] =&gt; scalaz.\&amp;/[A,B])iarray.IArray[scalaz.\&amp;/[A,B]]">alignWith</a><span class="delimiter">(</span><a href="#iarray;IArray.align.b" title="iarray.IArray[B]">b</a><span class="delimiter">)</span><span class="delimiter">(</span><a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.conform" title="scalaz.\&amp;/[A,B] =&gt; scalaz.\&amp;/[A,B]">conform</a><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B, C](that: iarray.IArray[B])(f: scalaz.\&amp;/[A,B] =&gt; C)iarray.IArray[C]" id="iarray;IArray.alignWith">alignWith</a><span class="delimiter">[</span><a title="" id="iarray;IArray.alignWith;B">B</a>, <a title="" id="iarray;IArray.alignWith;C">C</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="iarray.IArray[B]" id="iarray;IArray.alignWith.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">(</span><a title="scalaz.\&amp;/[A,B] =&gt; C" id="iarray;IArray.alignWith.f">f</a>: A \&amp;/ B =&gt; C<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">[</span>C<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">import</span> <span title="scalaz.\&amp;/.type">\&amp;/</span>._
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.alignWith.max">max</a> = <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">max</span><span class="delimiter">(</span><a href="#iarray;IArray.length" title="=&gt; Int">length</a>, <a href="#iarray;IArray.alignWith.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.alignWith.min">min</a> = <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">min</span><span class="delimiter">(</span><a href="#iarray;IArray.length" title="=&gt; Int">length</a>, <a href="#iarray;IArray.alignWith.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.alignWith.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.alignWith.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.max" title="Int">max</a><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.alignWith.min" title="Int">min</a><span class="delimiter">)</span><a href="#iarray;IArray.alignWith.while$20" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.alignWith.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.alignWith.f" title="(v1: scalaz.\&amp;/[A,B])C">f</a><span class="delimiter">(</span><span title="(aa: A, bb: B)scalaz.\&amp;/.Both[A,B]">Both</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.apply" title="(i: Int)B">that</a><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
      <a href="#iarray;IArray.alignWith.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray" title="IArray.this.type" class="keyword">this</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a> <span title="(x: Int)Boolean">&gt;</span> <a href="#iarray;IArray.alignWith.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.alignWith.max" title="Int">max</a><span class="delimiter">)</span><a href="#iarray;IArray.alignWith.while$21" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.alignWith.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.alignWith.f" title="(v1: scalaz.\&amp;/[A,B])C">f</a><span class="delimiter">(</span><span title="(aa: A)scalaz.\&amp;/.This[A]">This</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
        <a href="#iarray;IArray.alignWith.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray" title="IArray.this.type" class="keyword">this</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.alignWith.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.alignWith.max" title="Int">max</a><span class="delimiter">)</span><a href="#iarray;IArray.alignWith.while$22" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.alignWith.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.alignWith.f" title="(v1: scalaz.\&amp;/[A,B])C">f</a><span class="delimiter">(</span><span title="(bb: B)scalaz.\&amp;/.That[B]">That</span><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)B">that</a><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
        <a href="#iarray;IArray.alignWith.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[C]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">[</span>C<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.alignWith.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; iarray.WithIndex[A]" id="iarray;IArray.withIndex">withIndex</a>: <a href="WithIndex.scala.html#iarray;WithIndex" title="iarray.WithIndex[A]">WithIndex</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.WithIndex[A]" class="keyword">new</span> <a href="WithIndex.scala.html#iarray;WithIndex" title="iarray.WithIndex[A]">WithIndex</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;).zipWithIndex
   * res0: IArray[(String, Int)] = IArray((a,0), (b,1), (c,2))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; iarray.IArray[(A, Int)]" id="iarray;IArray.zipWithIndex">zipWithIndex</a>: <a href="#iarray;IArray" title="iarray.IArray[(A, Int)]">IArray</a><span class="delimiter">[</span><span class="delimiter">(</span>A, Int<span class="delimiter">)</span><span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.zipWithIndex.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.zipWithIndex.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.zipWithIndex.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.zipWithIndex.while$23" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.zipWithIndex.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.zipWithIndex.i" title="Int">i</a><span class="delimiter">)</span> = <span title="(_1: AnyRef, _2: Int)(AnyRef, Int)" class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipWithIndex.i" title="Int">i</a><span class="delimiter">)</span>, <a href="#iarray;IArray.zipWithIndex.i" title="Int">i</a><span class="delimiter">)</span>
      <a href="#iarray;IArray.zipWithIndex.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[(A, Int)]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[(A, Int)]">IArray</a><span class="delimiter">[</span><span class="delimiter">(</span>A, Int<span class="delimiter">)</span><span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.zipWithIndex.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;).zipWith(IArray(&quot;x&quot;, &quot;y&quot;, &quot;z&quot;))(_ + _)
   * res0: IArray[String] = IArray(ax, by, cz)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B, C](that: iarray.IArray[B])(f: (A, B) =&gt; C)iarray.IArray[C]" id="iarray;IArray.zipWith">zipWith</a><span class="delimiter">[</span><a title="" id="iarray;IArray.zipWith;B">B</a>, <a title="" id="iarray;IArray.zipWith;C">C</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="iarray.IArray[B]" id="iarray;IArray.zipWith.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">(</span><a title="(A, B) =&gt; C" id="iarray;IArray.zipWith.f">f</a>: <span class="delimiter">(</span>A, B<span class="delimiter">)</span> =&gt; C<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">[</span>C<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.zipWith.len">len</a> = <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">min</span><span class="delimiter">(</span><a href="#iarray;IArray.length" title="=&gt; Int">length</a>, <a href="#iarray;IArray.zipWith.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.zipWith.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.zipWith.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.zipWith.len" title="Int">len</a><span class="delimiter">)</span>
    <span class="keyword">val</span> <a title="(AnyRef, AnyRef) =&gt; AnyRef" id="iarray;IArray.zipWith.f0">f0</a> = <a href="#iarray;IArray.zipWith.f" title="(A, B) =&gt; C">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="(AnyRef, AnyRef) =&gt; AnyRef" class="delimiter">[</span><span class="delimiter">(</span>AnyRef, AnyRef<span class="delimiter">)</span> =&gt; AnyRef<span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.zipWith.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.zipWith.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.zipWith.while$24" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.zipWith.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.zipWith.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.zipWith.f0" title="(v1: AnyRef, v2: AnyRef)AnyRef">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipWith.i" title="Int">i</a><span class="delimiter">)</span>, <a href="#iarray;IArray.zipWith.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipWith.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.zipWith.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[C]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.zipWith.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;).zipAll(IArray(1, 2), &quot;z&quot;, 0)
   * res0: IArray[(String, Int)] = IArray((a,1), (b,2), (c,0), (d,0))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](that: iarray.IArray[B], a: A, b: B)iarray.IArray[(A, B)]" id="iarray;IArray.zipAll">zipAll</a><span class="delimiter">[</span><a title="" id="iarray;IArray.zipAll;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="iarray.IArray[B]" id="iarray;IArray.zipAll.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span>, <a title="A" id="iarray;IArray.zipAll.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a>, <a title="B" id="iarray;IArray.zipAll.b">b</a>: <a href="#iarray;IArray.zipAll;B" title="B">B</a><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[(A, B)]">IArray</a><span class="delimiter">[</span><span class="delimiter">(</span>A, B<span class="delimiter">)</span><span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.zipAll.len">len</a> = <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">max</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>, <a href="#iarray;IArray.zipAll.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.zipAll.min">min</a> = <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">min</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>, <a href="#iarray;IArray.zipAll.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.zipAll.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.len" title="Int">len</a><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.zipAll.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.zipAll.min" title="Int">min</a><span class="delimiter">)</span><a href="#iarray;IArray.zipAll.while$25" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.zipAll.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a><span class="delimiter">)</span> = <span title="(_1: A, _2: B)(A, B)" class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.zipAll.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="B" class="delimiter">[</span><a href="#iarray;IArray.zipAll;B" title="B">B</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.zipAll.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.min" title="Int">min</a> <span title="(x: Int)Boolean">==</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.zipAll.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.zipAll.while$26" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.zipAll.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a><span class="delimiter">)</span> = <span title="(_1: A, _2: B)(A, B)" class="delimiter">(</span><a href="#iarray;IArray.zipAll.a" title="A">a</a>, <a href="#iarray;IArray.zipAll.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="B" class="delimiter">[</span><a href="#iarray;IArray.zipAll;B" title="B">B</a><span class="delimiter">]</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.zipAll.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.zipAll.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.zipAll.while$27" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.zipAll.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a><span class="delimiter">)</span> = <span title="(_1: A, _2: B)(A, B)" class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.zipAll.b" title="B">b</a><span class="delimiter">)</span>
        <a href="#iarray;IArray.zipAll.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[(A, B)]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[(A, B)]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.zipAll.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;) zip IArray(1, 2, 3, 4)
   * res0: IArray[(String, Int)] = IArray((a,1), (b,2))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](that: iarray.IArray[B])iarray.IArray[(A, B)]" id="iarray;IArray.zip">zip</a><span class="delimiter">[</span><a title="" id="iarray;IArray.zip;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="iarray.IArray[B]" id="iarray;IArray.zip.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[(A, B)]">IArray</a><span class="delimiter">[</span><span class="delimiter">(</span>A, B<span class="delimiter">)</span><span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.zip.len">len</a> = <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">min</span><span class="delimiter">(</span><a href="#iarray;IArray.length" title="=&gt; Int">length</a>, <a href="#iarray;IArray.zip.that" title="iarray.IArray[B]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.zip.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.zip.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.zip.len" title="Int">len</a><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.zip.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.zip.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.zip.while$28" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.zip.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.zip.i" title="Int">i</a><span class="delimiter">)</span> = <span title="(_1: A, _2: B)(A, B)" class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.zip.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.apply" title="(i: Int)B">that</a><span class="delimiter">(</span><a href="#iarray;IArray.zip.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.zip.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[(A, B)]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[(A, B)]">IArray</a><span class="delimiter">[</span><span class="delimiter">(</span>A, B<span class="delimiter">)</span><span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.zip.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/** alias of `unzip2` */</span>
  <span class="keyword">def</span> <a title="[B, C](implicit e: &lt;:&lt;[A,Product2[B,C]])(iarray.IArray[B], iarray.IArray[C])" id="iarray;IArray.unzip">unzip</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unzip;B">B</a>, <a title="" id="iarray;IArray.unzip;C">C</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,Product2[B,C]]" id="iarray;IArray.unzip.e">e</a>: A <span title="&lt;:&lt;[A,Product2[B,C]]">&lt;:&lt;</span> Product2<span class="delimiter">[</span>B, C<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="(iarray.IArray[B], iarray.IArray[C])" class="delimiter">(</span>IArray<span class="delimiter">[</span>B<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>C<span class="delimiter">]</span><span class="delimiter">)</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unzip.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.unzip._1">_1</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip._2">_2</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unzip.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.unzip.while$29" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="Product2[AnyRef,AnyRef]" id="iarray;IArray.unzip.x">x</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="Product2[AnyRef,AnyRef]" class="delimiter">[</span><span title="Product2[AnyRef,AnyRef]">Product2</span><span class="delimiter">[</span>AnyRef, AnyRef<span class="delimiter">]</span><span class="delimiter">]</span>
      <a href="#iarray;IArray.unzip._1" title="(i: Int, x: AnyRef)Unit">_1</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip.x" title="Product2[AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_1</span>
      <a href="#iarray;IArray.unzip._2" title="(i: Int, x: AnyRef)Unit">_2</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip.x" title="Product2[AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_2</span>
      <a href="#iarray;IArray.unzip.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="(_1: iarray.IArray[B], _2: iarray.IArray[C])(iarray.IArray[B], iarray.IArray[C])" class="delimiter">(</span><span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip._1" title="Array[AnyRef]">_1</a><span class="delimiter">)</span>, <span title="iarray.IArray[C]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip._2" title="Array[AnyRef]">_2</a><span class="delimiter">)</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray((&quot;a&quot;, 1), (&quot;b&quot;, 2)).unzip2
   * res0: (IArray[String], IArray[Int]) = (IArray(a, b),IArray(1, 2))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B, C](implicit e: &lt;:&lt;[A,Product2[B,C]])(iarray.IArray[B], iarray.IArray[C])" id="iarray;IArray.unzip2">unzip2</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unzip2;B">B</a>, <a title="" id="iarray;IArray.unzip2;C">C</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,Product2[B,C]]" id="iarray;IArray.unzip2.e">e</a>: A <span title="&lt;:&lt;[A,Product2[B,C]]">&lt;:&lt;</span> Product2<span class="delimiter">[</span>B, C<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="(iarray.IArray[B], iarray.IArray[C])" class="delimiter">(</span>IArray<span class="delimiter">[</span>B<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>C<span class="delimiter">]</span><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip" title="[B, C](implicit e: &lt;:&lt;[A,Product2[B,C]])(iarray.IArray[B], iarray.IArray[C])">unzip</a><a href="#iarray;IArray.unzip2.e" title="(implicit e: &lt;:&lt;[A,Product2[B,C]])(iarray.IArray[B], iarray.IArray[C])" class="delimiter">[</a><a href="#iarray;IArray.unzip2;B" title="B">B</a>, <a href="#iarray;IArray.unzip2;C" title="C">C</a><span class="delimiter">]</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray((&quot;a&quot;, 1, true), (&quot;b&quot;, 2, false)).unzip3
   * res0: (IArray[String], IArray[Int], IArray[Boolean]) = (IArray(a, b),IArray(1, 2),IArray(true, false))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B, C, D](implicit e: &lt;:&lt;[A,Product3[B,C,D]])(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D])" id="iarray;IArray.unzip3">unzip3</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unzip3;B">B</a>, <a title="" id="iarray;IArray.unzip3;C">C</a>, <a title="" id="iarray;IArray.unzip3;D">D</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,Product3[B,C,D]]" id="iarray;IArray.unzip3.e">e</a>: A <span title="&lt;:&lt;[A,Product3[B,C,D]]">&lt;:&lt;</span> Product3<span class="delimiter">[</span>B, C, D<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D])" class="delimiter">(</span>IArray<span class="delimiter">[</span>B<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>C<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>D<span class="delimiter">]</span><span class="delimiter">)</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unzip3.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.unzip3._1">_1</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip3._2">_2</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip3._3">_3</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unzip3.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.unzip3.while$30" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="Product3[AnyRef,AnyRef,AnyRef]" id="iarray;IArray.unzip3.x">x</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip3.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="Product3[AnyRef,AnyRef,AnyRef]" class="delimiter">[</span><span title="Product3[AnyRef,AnyRef,AnyRef]">Product3</span><span class="delimiter">[</span>AnyRef, AnyRef, AnyRef<span class="delimiter">]</span><span class="delimiter">]</span>
      <a href="#iarray;IArray.unzip3._1" title="(i: Int, x: AnyRef)Unit">_1</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip3.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip3.x" title="Product3[AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_1</span>
      <a href="#iarray;IArray.unzip3._2" title="(i: Int, x: AnyRef)Unit">_2</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip3.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip3.x" title="Product3[AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_2</span>
      <a href="#iarray;IArray.unzip3._3" title="(i: Int, x: AnyRef)Unit">_3</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip3.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip3.x" title="Product3[AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_3</span>
      <a href="#iarray;IArray.unzip3.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="(_1: iarray.IArray[B], _2: iarray.IArray[C], _3: iarray.IArray[D])(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D])" class="delimiter">(</span><span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip3._1" title="Array[AnyRef]">_1</a><span class="delimiter">)</span>, <span title="iarray.IArray[C]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip3._2" title="Array[AnyRef]">_2</a><span class="delimiter">)</span>, <span title="iarray.IArray[D]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[D]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip3._3" title="Array[AnyRef]">_3</a><span class="delimiter">)</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray((&quot;a&quot;, 1, true, 'x), (&quot;b&quot;, 2, false, 'y)).unzip4
   * res0: (IArray[String], IArray[Int], IArray[Boolean], IArray[Symbol]) = (IArray(a, b),IArray(1, 2),IArray(true, false),IArray('x, 'y))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B, C, D, E](implicit e: &lt;:&lt;[A,Product4[B,C,D,E]])(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D], iarray.IArray[E])" id="iarray;IArray.unzip4">unzip4</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unzip4;B">B</a>, <a title="" id="iarray;IArray.unzip4;C">C</a>, <a title="" id="iarray;IArray.unzip4;D">D</a>, <a title="" id="iarray;IArray.unzip4;E">E</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,Product4[B,C,D,E]]" id="iarray;IArray.unzip4.e">e</a>: A <span title="&lt;:&lt;[A,Product4[B,C,D,E]]">&lt;:&lt;</span> Product4<span class="delimiter">[</span>B, C, D, E<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D], iarray.IArray[E])" class="delimiter">(</span>IArray<span class="delimiter">[</span>B<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>C<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>D<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>E<span class="delimiter">]</span><span class="delimiter">)</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unzip4.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.unzip4._1">_1</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip4._2">_2</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip4._3">_3</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip4._4">_4</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unzip4.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.unzip4.while$31" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="Product4[AnyRef,AnyRef,AnyRef,AnyRef]" id="iarray;IArray.unzip4.x">x</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="Product4[AnyRef,AnyRef,AnyRef,AnyRef]" class="delimiter">[</span><span title="Product4[AnyRef,AnyRef,AnyRef,AnyRef]">Product4</span><span class="delimiter">[</span>AnyRef, AnyRef, AnyRef, AnyRef<span class="delimiter">]</span><span class="delimiter">]</span>
      <a href="#iarray;IArray.unzip4._1" title="(i: Int, x: AnyRef)Unit">_1</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip4.x" title="Product4[AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_1</span>
      <a href="#iarray;IArray.unzip4._2" title="(i: Int, x: AnyRef)Unit">_2</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip4.x" title="Product4[AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_2</span>
      <a href="#iarray;IArray.unzip4._3" title="(i: Int, x: AnyRef)Unit">_3</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip4.x" title="Product4[AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_3</span>
      <a href="#iarray;IArray.unzip4._4" title="(i: Int, x: AnyRef)Unit">_4</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip4.x" title="Product4[AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_4</span>
      <a href="#iarray;IArray.unzip4.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="(_1: iarray.IArray[B], _2: iarray.IArray[C], _3: iarray.IArray[D], _4: iarray.IArray[E])(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D], iarray.IArray[E])" class="delimiter">(</span><span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4._1" title="Array[AnyRef]">_1</a><span class="delimiter">)</span>, <span title="iarray.IArray[C]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4._2" title="Array[AnyRef]">_2</a><span class="delimiter">)</span>, <span title="iarray.IArray[D]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[D]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4._3" title="Array[AnyRef]">_3</a><span class="delimiter">)</span>, <span title="iarray.IArray[E]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[E]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip4._4" title="Array[AnyRef]">_4</a><span class="delimiter">)</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray((&quot;a&quot;, 1, true, 'x, 'f'), (&quot;b&quot;, 2, false, 'y, 'g')).unzip5
   * res0: (IArray[String], IArray[Int], IArray[Boolean], IArray[Symbol], IArray[Char]) = (IArray(a, b),IArray(1, 2),IArray(true, false),IArray('x, 'y),IArray(f, g))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B, C, D, E, F](implicit e: &lt;:&lt;[A,Product5[B,C,D,E,F]])(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D], iarray.IArray[E], iarray.IArray[F])" id="iarray;IArray.unzip5">unzip5</a><span class="delimiter">[</span><a title="" id="iarray;IArray.unzip5;B">B</a>, <a title="" id="iarray;IArray.unzip5;C">C</a>, <a title="" id="iarray;IArray.unzip5;D">D</a>, <a title="" id="iarray;IArray.unzip5;E">E</a>, <a title="" id="iarray;IArray.unzip5;F">F</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,Product5[B,C,D,E,F]]" id="iarray;IArray.unzip5.e">e</a>: A <span title="&lt;:&lt;[A,Product5[B,C,D,E,F]]">&lt;:&lt;</span> Product5<span class="delimiter">[</span>B, C, D, E, F<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D], iarray.IArray[E], iarray.IArray[F])" class="delimiter">(</span>IArray<span class="delimiter">[</span>B<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>C<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>D<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>E<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>F<span class="delimiter">]</span><span class="delimiter">)</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.unzip5.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.unzip5._1">_1</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip5._2">_2</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip5._3">_3</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip5._4">_4</a>, <a title="Array[AnyRef]" id="iarray;IArray.unzip5._5">_5</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.unzip5.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.unzip5.while$32" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="Product5[AnyRef,AnyRef,AnyRef,AnyRef,AnyRef]" id="iarray;IArray.unzip5.x">x</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="Product5[AnyRef,AnyRef,AnyRef,AnyRef,AnyRef]" class="delimiter">[</span><span title="Product5[AnyRef,AnyRef,AnyRef,AnyRef,AnyRef]">Product5</span><span class="delimiter">[</span>AnyRef, AnyRef, AnyRef, AnyRef, AnyRef<span class="delimiter">]</span><span class="delimiter">]</span>
      <a href="#iarray;IArray.unzip5._1" title="(i: Int, x: AnyRef)Unit">_1</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip5.x" title="Product5[AnyRef,AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_1</span>
      <a href="#iarray;IArray.unzip5._2" title="(i: Int, x: AnyRef)Unit">_2</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip5.x" title="Product5[AnyRef,AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_2</span>
      <a href="#iarray;IArray.unzip5._3" title="(i: Int, x: AnyRef)Unit">_3</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip5.x" title="Product5[AnyRef,AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_3</span>
      <a href="#iarray;IArray.unzip5._4" title="(i: Int, x: AnyRef)Unit">_4</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip5.x" title="Product5[AnyRef,AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_4</span>
      <a href="#iarray;IArray.unzip5._5" title="(i: Int, x: AnyRef)Unit">_5</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.unzip5.x" title="Product5[AnyRef,AnyRef,AnyRef,AnyRef,AnyRef]">x</a>.<span title="=&gt; AnyRef">_5</span>
      <a href="#iarray;IArray.unzip5.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="(_1: iarray.IArray[B], _2: iarray.IArray[C], _3: iarray.IArray[D], _4: iarray.IArray[E], _5: iarray.IArray[F])(iarray.IArray[B], iarray.IArray[C], iarray.IArray[D], iarray.IArray[E], iarray.IArray[F])" class="delimiter">(</span><span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5._1" title="Array[AnyRef]">_1</a><span class="delimiter">)</span>, <span title="iarray.IArray[C]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5._2" title="Array[AnyRef]">_2</a><span class="delimiter">)</span>, <span title="iarray.IArray[D]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[D]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5._3" title="Array[AnyRef]">_3</a><span class="delimiter">)</span>, <span title="iarray.IArray[E]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[E]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5._4" title="Array[AnyRef]">_4</a><span class="delimiter">)</span>, <span title="iarray.IArray[F]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[F]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.unzip5._5" title="Array[AnyRef]">_5</a><span class="delimiter">)</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray((&quot;a&quot;, 1), (&quot;b&quot;, 2)).firsts
   * res0: IArray[String] = IArray(a, b)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B, C](implicit e: &lt;:&lt;[A,Product2[B,C]])iarray.IArray[B]" id="iarray;IArray.firsts">firsts</a><span class="delimiter">[</span><a title="" id="iarray;IArray.firsts;B">B</a>, <a title="" id="iarray;IArray.firsts;C">C</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,Product2[B,C]]" id="iarray;IArray.firsts.e">e</a>: A <span title="&lt;:&lt;[A,Product2[B,C]]">&lt;:&lt;</span> Product2<span class="delimiter">[</span>B, C<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.firsts.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.firsts.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.firsts.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.firsts.while$33" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.firsts.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.firsts.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.firsts.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="Product2[AnyRef,AnyRef]" class="delimiter">[</span><span title="Product2[AnyRef,AnyRef]">Product2</span><span class="delimiter">[</span>AnyRef, AnyRef<span class="delimiter">]</span><span class="delimiter">]</span>.<span title="=&gt; AnyRef">_1</span>
      <a href="#iarray;IArray.firsts.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.firsts.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray((&quot;a&quot;, 10), (&quot;b&quot;, 20)).seconds
   * res0: IArray[Int] = IArray(10, 20)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B, C](implicit e: &lt;:&lt;[A,Product2[B,C]])iarray.IArray[C]" id="iarray;IArray.seconds">seconds</a><span class="delimiter">[</span><a title="" id="iarray;IArray.seconds;B">B</a>, <a title="" id="iarray;IArray.seconds;C">C</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,Product2[B,C]]" id="iarray;IArray.seconds.e">e</a>: A <span title="&lt;:&lt;[A,Product2[B,C]]">&lt;:&lt;</span> Product2<span class="delimiter">[</span>B, C<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">[</span>C<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.seconds.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.seconds.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.seconds.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.seconds.while$34" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.seconds.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.seconds.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.seconds.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="Product2[AnyRef,AnyRef]" class="delimiter">[</span><span title="Product2[AnyRef,AnyRef]">Product2</span><span class="delimiter">[</span>AnyRef, AnyRef<span class="delimiter">]</span><span class="delimiter">]</span>.<span title="=&gt; AnyRef">_2</span>
      <a href="#iarray;IArray.seconds.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[C]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[C]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.seconds.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(10, 20, 30, 40).reversed[List]
   * res0: List[Int] = List(40, 30, 20, 10)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[F[_]](implicit C: scala.collection.generic.CanBuildFrom[Nothing,A,F[A]])F[A]" id="iarray;IArray.reversed">reversed</a><span class="delimiter">[</span><a title="[_]" id="iarray;IArray.reversed;F">F</a><span class="delimiter">[</span><a title="" id="iarray;IArray.reversed;F;_">_</a><span class="delimiter">]</span><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scala.collection.generic.CanBuildFrom[Nothing,A,F[A]]" id="iarray;IArray.reversed.C">C</a>: <span title="scala.collection.generic.CanBuildFrom[Nothing,A,F[A]]">CanBuildFrom</span><span class="delimiter">[</span>Nothing, A, F<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray.reversed;F" title="F[A]">F</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="scala.collection.mutable.Builder[A,F[A]]" id="iarray;IArray.reversed.buf">buf</a> = <a href="#iarray;IArray.reversed.C" title="()scala.collection.mutable.Builder[A,F[A]]">C</a><span class="delimiter">(</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.reversed.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.reversed.i" title="Int">i</a> <span title="(x: Int)Boolean">&gt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><a href="#iarray;IArray.reversed.while$35" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.reversed.buf" title="scala.collection.mutable.Builder[A,F[A]]">buf</a> <span title="(elem: A)buf.type">+=</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.reversed.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
      <a href="#iarray;IArray.reversed.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.reversed.buf" title="scala.collection.mutable.Builder[A,F[A]]">buf</a>.<span title="()F[A]">result</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(10, 20, 30, 40).to[Vector]
   * res0: Vector[Int] = Vector(10, 20, 30, 40)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[F[_]](implicit C: scala.collection.generic.CanBuildFrom[Nothing,A,F[A]])F[A]" id="iarray;IArray.to">to</a><span class="delimiter">[</span><a title="[_]" id="iarray;IArray.to;F">F</a><span class="delimiter">[</span><a title="" id="iarray;IArray.to;F;_">_</a><span class="delimiter">]</span><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scala.collection.generic.CanBuildFrom[Nothing,A,F[A]]" id="iarray;IArray.to.C">C</a>: <span title="scala.collection.generic.CanBuildFrom[Nothing,A,F[A]]">CanBuildFrom</span><span class="delimiter">[</span>Nothing, A, F<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray.to;F" title="F[A]">F</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="scala.collection.mutable.Builder[A,F[A]]" id="iarray;IArray.to.buf">buf</a> = <a href="#iarray;IArray.to.C" title="()scala.collection.mutable.Builder[A,F[A]]">C</a><span class="delimiter">(</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.to.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.to.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.to.while$36" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.to.buf" title="scala.collection.mutable.Builder[A,F[A]]">buf</a> <span title="(elem: A)buf.type">+=</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.to.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
      <a href="#iarray;IArray.to.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.to.buf" title="scala.collection.mutable.Builder[A,F[A]]">buf</a>.<span title="()F[A]">result</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.OneAnd
   * scala&gt; IArray(10, 20, 30, 40).toOneAnd[Vector]
   * res0: Option[OneAnd[Vector, Int]] = Some(OneAnd(10,Vector(20, 30, 40)))
   * scala&gt; IArray.empty[String].toOneAnd[Vector]
   * res1: Option[OneAnd[Vector, String]] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[F[_]](implicit C: scala.collection.generic.CanBuildFrom[Nothing,A,F[A]])Option[scalaz.OneAnd[F,A]]" id="iarray;IArray.toOneAnd">toOneAnd</a><span class="delimiter">[</span><a title="[_]" id="iarray;IArray.toOneAnd;F">F</a><span class="delimiter">[</span><a title="" id="iarray;IArray.toOneAnd;F;_">_</a><span class="delimiter">]</span><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scala.collection.generic.CanBuildFrom[Nothing,A,F[A]]" id="iarray;IArray.toOneAnd.C">C</a>: <span title="scala.collection.generic.CanBuildFrom[Nothing,A,F[A]]">CanBuildFrom</span><span class="delimiter">[</span>Nothing, A, F<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[scalaz.OneAnd[F,A]]">Option</span><span class="delimiter">[</span>OneAnd<span class="delimiter">[</span>F, A<span class="delimiter">]</span><span class="delimiter">]</span> =
    <span title="Option[scalaz.OneAnd[F,A]]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">val</span> <a title="scala.collection.mutable.Builder[A,F[A]]" id="iarray;IArray.toOneAnd.buf">buf</a> = <a href="#iarray;IArray.toOneAnd.C" title="()scala.collection.mutable.Builder[A,F[A]]">C</a><span class="delimiter">(</span><span class="delimiter">)</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.toOneAnd.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.toOneAnd.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.toOneAnd.while$37" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.toOneAnd.buf" title="scala.collection.mutable.Builder[A,F[A]]">buf</a> <span title="(elem: A)buf.type">+=</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.toOneAnd.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
        <a href="#iarray;IArray.toOneAnd.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="(x: scalaz.OneAnd[F,A])Some[scalaz.OneAnd[F,A]]">Some</span><span class="delimiter">(</span><span title="(head: A, tail: F[A])scalaz.OneAnd[F,A]">OneAnd</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.toOneAnd.buf" title="scala.collection.mutable.Builder[A,F[A]]">buf</a>.<span title="()F[A]">result</span><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5).filter(_ % 3 != 1)
   * res0: IArray[Int] = IArray(2, 3, 5)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)iarray.IArray[A]" id="iarray;IArray.filter">filter</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.filter.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" id="iarray;IArray.filter.buf">buf</a> = <span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" class="keyword">new</span> ArrayBuilder.<span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">ofRef</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.filter.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.filter.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.filter.while$38" title="()Unit" class="delimiter">{</a>
      <span title="Any" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.filter.f" title="(v1: A)Boolean">f</a><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.filter.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <a href="#iarray;IArray.filter.buf" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">buf</a> <span title="(elem: AnyRef)buf.type">+=</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.filter.i" title="Int">i</a><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.filter.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.filter.buf" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">buf</a>.<span title="()Array[AnyRef]">result</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5).withFilter(_ % 3 != 1).map(_ * 10)
   * res0: IArray[Int] = IArray(20, 30, 50)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)iarray.WithFilter[A]" id="iarray;IArray.withFilter">withFilter</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.withFilter.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <a href="WithFilter.scala.html#iarray;WithFilter" title="iarray.WithFilter[A]">WithFilter</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.WithFilter[A]" class="keyword">new</span> <a href="WithFilter.scala.html#iarray;WithFilter" title="iarray.WithFilter[A]">WithFilter</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.withFilter.f" title="A =&gt; Boolean">f</a><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).mapTo(_ * 10): List[Int]
   * res0: List[Int] = List(10, 20, 30)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[C, B](f: A =&gt; B)(implicit C: scala.collection.generic.CanBuildFrom[Nothing,B,C])C" id="iarray;IArray.mapTo">mapTo</a><span class="delimiter">[</span><a title="" id="iarray;IArray.mapTo;C">C</a>, <a title="" id="iarray;IArray.mapTo;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.mapTo.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scala.collection.generic.CanBuildFrom[Nothing,B,C]" id="iarray;IArray.mapTo.C">C</a>: <span title="scala.collection.generic.CanBuildFrom[Nothing,B,C]">CanBuildFrom</span><span class="delimiter">[</span>Nothing, B, C<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray.mapTo;C" title="C">C</a> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="scala.collection.mutable.Builder[B,C]" id="iarray;IArray.mapTo.buf">buf</a> = <a href="#iarray;IArray.mapTo.C" title="()scala.collection.mutable.Builder[B,C]">C</a><span class="delimiter">(</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.mapTo.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.mapTo.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.mapTo.while$39" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.mapTo.buf" title="scala.collection.mutable.Builder[B,C]">buf</a> <span title="(elem: B)buf.type">+=</span> <a href="#iarray;IArray.mapTo.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.mapTo.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.mapTo.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.mapTo.buf" title="scala.collection.mutable.Builder[B,C]">buf</a>.<span title="()C">result</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).map(_ * 10)
   * res0: IArray[Int] = IArray(10, 20, 30)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)iarray.IArray[B]" id="iarray;IArray.map">map</a><span class="delimiter">[</span><a title="" id="iarray;IArray.map;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.map.f">f</a>: A =&gt; B<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.map.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.map.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.map.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.map.while$40" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.map.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.map.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.map.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.map.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
      <a href="#iarray;IArray.map.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.map.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[U](f: A =&gt; U)Unit" id="iarray;IArray.foreach">foreach</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foreach;U">U</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; U" id="iarray;IArray.foreach.f">f</a>: A =&gt; U<span class="delimiter">)</span>: <span title="Unit">Unit</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foreach.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foreach.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.foreach.while$41" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.foreach.f" title="(v1: A)U">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.foreach.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.foreach.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; val a = IArray(1, 2, 3, 4)
   * scala&gt; a.contains(3)
   * res0: Boolean = true
   * scala&gt; a.contains(5)
   * res1: Boolean = false
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(a: A)(implicit A: scalaz.Equal[A])Boolean" id="iarray;IArray.contains">contains</a><span class="delimiter">(</span><a title="A" id="iarray;IArray.contains.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Equal[A]" id="iarray;IArray.contains.A">A</a>: <span title="scalaz.Equal[A]">Equal</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Boolean">Boolean</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.contains.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.contains.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.contains.while$42" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.contains.A" title="scalaz.Equal[A]">A</a>.<span title="(a1: A, a2: A)Boolean">equal</span><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.contains.i" title="Int">i</a><span class="delimiter">)</span>, <a href="#iarray;IArray.contains.a" title="A">a</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <span title="Boolean(true)" class="keyword">true</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.contains.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="Boolean(false)" class="keyword">false</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; val a = IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;)
   * scala&gt; a.dropL(-1)
   * res0: IArray[String] = IArray(a, b, c, d, e)
   * scala&gt; a.dropL(2)
   * res1: IArray[String] = IArray(c, d, e)
   * scala&gt; a.dropL(6)
   * res2: IArray[String] = IArray()
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(n: Int)iarray.IArray[A]" id="iarray;IArray.dropL">dropL</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.dropL.n">n</a>: <span title="Int">Int</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.dropL.n" title="Int">n</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.dropL.n" title="Int">n</a> <span title="(x: Int)Boolean">&gt;=</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.dropL.n" title="Int">n</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; val a = IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;)
   * scala&gt; a.dropR(-1)
   * res0: IArray[String] = IArray(a, b, c, d, e)
   * scala&gt; a.dropR(2)
   * res1: IArray[String] = IArray(a, b, c)
   * scala&gt; a.dropR(6)
   * res2: IArray[String] = IArray()
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(n: Int)iarray.IArray[A]" id="iarray;IArray.dropR">dropR</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.dropR.n">n</a>: <span title="Int">Int</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.dropR.n" title="Int">n</a> <span title="(x: Int)Boolean">&lt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.dropR.n" title="Int">n</a> <span title="(x: Int)Boolean">&gt;=</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int)Array[AnyRef]">copyOf</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <a href="#iarray;IArray.dropR.n" title="Int">n</a><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; 100 +: IArray(1, 2, 3)
   * res0: IArray[Int] = IArray(100, 1, 2, 3)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(a: A)iarray.IArray[A]" id="iarray;IArray.+:">+:</a><span class="delimiter">(</span><a title="A" id="iarray;IArray.+:.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.+:.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>
    <span title="System.type">System</span>.<span title="(x$1: Any, x$2: Int, x$3: Any, x$4: Int, x$5: Int)Unit">arraycopy</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <span title="Int(0)" class="int">0</span>, <a href="#iarray;IArray.+:.array" title="Array[AnyRef]">array</a>, <span title="Int(1)" class="int">1</span>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <a href="#iarray;IArray.+:.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span> = <a href="#iarray;IArray.+:.a" title="A">a</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
    <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.+:.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3) :+ 100
   * res0: IArray[Int] = IArray(1, 2, 3, 100)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(a: A)iarray.IArray[A]" id="iarray;IArray.:+">:+</a><span class="delimiter">(</span><a title="A" id="iarray;IArray.:+.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.:+.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>
    <span title="System.type">System</span>.<span title="(x$1: Any, x$2: Int, x$3: Any, x$4: Int, x$5: Int)Unit">arraycopy</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <span title="Int(0)" class="int">0</span>, <a href="#iarray;IArray.:+.array" title="Array[AnyRef]">array</a>, <span title="Int(0)" class="int">0</span>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <a href="#iarray;IArray.:+.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span> = <a href="#iarray;IArray.:+.a" title="A">a</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
    <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.:+.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;) ++ IArray(&quot;x&quot;, &quot;y&quot;)
   * res0: IArray[String] = IArray(a, b, c, x, y)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(that: iarray.IArray[A])iarray.IArray[A]" id="iarray;IArray.++">++</a><span class="delimiter">(</span><a title="iarray.IArray[A]" id="iarray;IArray.++.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray.++.that" title="iarray.IArray[A]">that</a>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.++.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">val</span> <a title="Int" id="iarray;IArray.++.size1">size1</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>
      <span class="keyword">val</span> <a title="Int" id="iarray;IArray.++.size2">size2</a> = <a href="#iarray;IArray.++.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a>
      <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.++.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.++.size1" title="Int">size1</a> <span title="(x: Int)Int">+</span> <a href="#iarray;IArray.++.size2" title="Int">size2</a><span class="delimiter">)</span>
      <span title="System.type">System</span>.<span title="(x$1: Any, x$2: Int, x$3: Any, x$4: Int, x$5: Int)Unit">arraycopy</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <span title="Int(0)" class="int">0</span>, <a href="#iarray;IArray.++.array" title="Array[AnyRef]">array</a>, <span title="Int(0)" class="int">0</span>, <a href="#iarray;IArray.++.size1" title="Int">size1</a><span class="delimiter">)</span>
      <span title="System.type">System</span>.<span title="(x$1: Any, x$2: Int, x$3: Any, x$4: Int, x$5: Int)Unit">arraycopy</span><span class="delimiter">(</span><a href="#iarray;IArray.++.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <span title="Int(0)" class="int">0</span>, <a href="#iarray;IArray.++.array" title="Array[AnyRef]">array</a>, <a href="#iarray;IArray.++.size1" title="Int">size1</a>, <a href="#iarray;IArray.++.size2" title="Int">size2</a><span class="delimiter">)</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.++.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: iarray.IArray[A] =&gt; B)iarray.IArray[B]" id="iarray;IArray.cobind">cobind</a><span class="delimiter">[</span><a title="" id="iarray;IArray.cobind;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="iarray.IArray[A] =&gt; B" id="iarray;IArray.cobind.f">f</a>: IArray<span class="delimiter">[</span>A<span class="delimiter">]</span> =&gt; B<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span title="iarray.IArray[B]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="iarray.IArray[B]">empty</a>
    <span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.cobind.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.cobind.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span> = <a href="#iarray;IArray.cobind.f" title="(v1: iarray.IArray[A])B">f</a><span class="delimiter">(</span><a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.cobind.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.cobind.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.cobind.while$43" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.cobind.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.cobind.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.cobind.f" title="(v1: iarray.IArray[A])B">f</a><span class="delimiter">(</span><span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.cobind.i" title="Int">i</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
        <a href="#iarray;IArray.cobind.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.cobind.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="=&gt; iarray.IArray[iarray.IArray[A]]" id="iarray;IArray.cojoin">cojoin</a>: <a href="#iarray;IArray" title="iarray.IArray[iarray.IArray[A]]">IArray</a><span class="delimiter">[</span>IArray<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span title="iarray.IArray[iarray.IArray[A]]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="iarray.IArray[iarray.IArray[A]]">empty</a>
    <span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.cojoin.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.cojoin.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.cojoin.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span> = <a href="#iarray;IArray" title="IArray.this.type" class="keyword">this</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.cojoin.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.cojoin.while$44" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.cojoin.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.cojoin.i" title="Int">i</a><span class="delimiter">)</span> = <span class="delimiter">(</span><span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.cojoin.i" title="Int">i</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
        <a href="#iarray;IArray.cojoin.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="iarray.IArray[iarray.IArray[A]]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[iarray.IArray[A]]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.cojoin.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[S, B](z: S)(f: (S, A) =&gt; (S, B))(S, iarray.IArray[B])" id="iarray;IArray.mapAccumL">mapAccumL</a><span class="delimiter">[</span><a title="" id="iarray;IArray.mapAccumL;S">S</a>, <a title="" id="iarray;IArray.mapAccumL;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="S" id="iarray;IArray.mapAccumL.z">z</a>: <a href="#iarray;IArray.mapAccumL;S" title="S">S</a><span class="delimiter">)</span><span class="delimiter">(</span><a title="(S, A) =&gt; (S, B)" id="iarray;IArray.mapAccumL.f">f</a>: <span class="delimiter">(</span>S, A<span class="delimiter">)</span> =&gt; <span class="delimiter">(</span>S, B<span class="delimiter">)</span><span class="delimiter">)</span>: <span title="(S, iarray.IArray[B])" class="delimiter">(</span>S, IArray<span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.mapAccumL.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.mapAccumL.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="S" id="iarray;IArray.mapAccumL.acc">acc</a> = <a href="#iarray;IArray.mapAccumL.z" title="S">z</a>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumL.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.mapAccumL.while$45" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="(S, B)" id="iarray;IArray.mapAccumL.x">x</a> = <a href="#iarray;IArray.mapAccumL.f" title="(v1: S, v2: A)(S, B)">f</a><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumL.acc" title="S">acc</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumL.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.mapAccumL.acc" title="S">acc</a> = <a href="#iarray;IArray.mapAccumL.x" title="(S, B)">x</a>.<span title="=&gt; S">_1</span>
      <a href="#iarray;IArray.mapAccumL.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumL.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.mapAccumL.x" title="(S, B)">x</a>.<span title="=&gt; B">_2</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
      <a href="#iarray;IArray.mapAccumL.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="(_1: S, _2: iarray.IArray[B])(S, iarray.IArray[B])" class="delimiter">(</span><a href="#iarray;IArray.mapAccumL.acc" title="S">acc</a>, <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumL.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[S, B](z: S)(f: (S, A) =&gt; (S, B))(S, iarray.IArray[B])" id="iarray;IArray.mapAccumR">mapAccumR</a><span class="delimiter">[</span><a title="" id="iarray;IArray.mapAccumR;S">S</a>, <a title="" id="iarray;IArray.mapAccumR;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="S" id="iarray;IArray.mapAccumR.z">z</a>: <a href="#iarray;IArray.mapAccumR;S" title="S">S</a><span class="delimiter">)</span><span class="delimiter">(</span><a title="(S, A) =&gt; (S, B)" id="iarray;IArray.mapAccumR.f">f</a>: <span class="delimiter">(</span>S, A<span class="delimiter">)</span> =&gt; <span class="delimiter">(</span>S, B<span class="delimiter">)</span><span class="delimiter">)</span>: <span title="(S, iarray.IArray[B])" class="delimiter">(</span>S, IArray<span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.mapAccumR.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.mapAccumR.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="S" id="iarray;IArray.mapAccumR.acc">acc</a> = <a href="#iarray;IArray.mapAccumR.z" title="S">z</a>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><span title="Int(0)" class="int">0</span> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.mapAccumR.i" title="Int">i</a><span class="delimiter">)</span><a href="#iarray;IArray.mapAccumR.while$46" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="(S, B)" id="iarray;IArray.mapAccumR.x">x</a> = <a href="#iarray;IArray.mapAccumR.f" title="(v1: S, v2: A)(S, B)">f</a><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumR.acc" title="S">acc</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumR.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.mapAccumR.acc" title="S">acc</a> = <a href="#iarray;IArray.mapAccumR.x" title="(S, B)">x</a>.<span title="=&gt; S">_1</span>
      <a href="#iarray;IArray.mapAccumR.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumR.i" title="Int">i</a><span class="delimiter">)</span> = <a href="#iarray;IArray.mapAccumR.x" title="(S, B)">x</a>.<span title="=&gt; B">_2</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
      <a href="#iarray;IArray.mapAccumR.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="(_1: S, _2: iarray.IArray[B])(S, iarray.IArray[B])" class="delimiter">(</span><a href="#iarray;IArray.mapAccumR.acc" title="S">acc</a>, <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.mapAccumR.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(1, 2, 3, 4, 5).fold
   * res0: Int = 15
   * scala&gt; import scalaz.std.string._
   * scala&gt; IArray(&quot;a&quot;, &quot;bc&quot;, &quot;d&quot;).fold
   * res1: String = abcd
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(implicit A: scalaz.Monoid[A])A" id="iarray;IArray.fold">fold</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Monoid[A]" id="iarray;IArray.fold.A">A</a>: <span title="scalaz.Monoid[A]">Monoid</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray;A" title="A">A</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.fold.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">var</span> <a title="A" id="iarray;IArray.fold.acc">acc</a> = <a href="#iarray;IArray.fold.A" title="scalaz.Monoid[A]">A</a>.<span title="=&gt; A">zero</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.fold.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.fold.while$47" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.fold.acc" title="A">acc</a> = <a href="#iarray;IArray.fold.A" title="scalaz.Monoid[A]">A</a>.<span title="(f1: A, f2: =&gt; A)A">append</span><span class="delimiter">(</span><a href="#iarray;IArray.fold.acc" title="A">acc</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.fold.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.fold.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.fold.acc" title="A">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.{\/, \/-, -\/}
   * scala&gt; import scalaz.std.string._, scalaz.std.anyVal._
   * scala&gt; IArray[Int \/ String](\/-(&quot;a&quot;), -\/(1), -\/(2), \/-(&quot;b&quot;)).fold1Opt
   * res0: Option[Int \/ String] = Some(-\/(3))
   * scala&gt; IArray.empty[Int \/ String].fold1Opt
   * res1: Option[Int \/ String] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(implicit A: scalaz.Semigroup[A])Option[A]" id="iarray;IArray.fold1Opt">fold1Opt</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Semigroup[A]" id="iarray;IArray.fold1Opt.A">A</a>: <span title="scalaz.Semigroup[A]">Semigroup</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="A" id="iarray;IArray.fold1Opt.acc">acc</a>: <a href="#iarray;IArray;A" title="A">A</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.fold1Opt.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.fold1Opt.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.fold1Opt.while$48" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.fold1Opt.acc" title="A">acc</a> = <a href="#iarray;IArray.fold1Opt.A" title="scalaz.Semigroup[A]">A</a>.<span title="(f1: A, f2: =&gt; A)A">append</span><span class="delimiter">(</span><a href="#iarray;IArray.fold1Opt.acc" title="A">acc</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.fold1Opt.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.fold1Opt.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.fold1Opt.acc" title="A">acc</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">// unsafe</span>
  <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit B: scalaz.Semigroup[B])B" id="iarray;IArray.foldMap1">foldMap1</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foldMap1;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.foldMap1.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Semigroup[B]" id="iarray;IArray.foldMap1.B">B</a>: <span title="scalaz.Semigroup[B]">Semigroup</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray.foldMap1;B" title="B">B</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.foldMap1.acc">acc</a> = <a href="#iarray;IArray.foldMap1.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foldMap1.i">i</a> = <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMap1.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.foldMap1.while$49" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.foldMap1.acc" title="B">acc</a> = <a href="#iarray;IArray.foldMap1.B" title="scalaz.Semigroup[B]">B</a>.<span title="(f1: B, f2: =&gt; B)B">append</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMap1.acc" title="B">acc</a>, <a href="#iarray;IArray.foldMap1.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.foldMap1.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.foldMap1.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.foldMap1.acc" title="B">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit B: scalaz.Semigroup[B])Option[B]" id="iarray;IArray.foldMap1Opt">foldMap1Opt</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foldMap1Opt;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.foldMap1Opt.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Semigroup[B]" id="iarray;IArray.foldMap1Opt.B">B</a>: <span title="scalaz.Semigroup[B]">Semigroup</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[B]">Option</span><span class="delimiter">[</span>B<span class="delimiter">]</span> =
    <span title="Option[B]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="(x: B)Some[B]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMap1" title="(f: A =&gt; B)(implicit B: scalaz.Semigroup[B])B">foldMap1</a><a href="#iarray;IArray.foldMap1Opt.B" title="scalaz.Semigroup[B]" class="delimiter">(</a><a href="#iarray;IArray.foldMap1Opt.f" title="A =&gt; B">f</a><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;ab&quot;, &quot;cde&quot;).flatMap(IArray.from(_))
   * res0: IArray[Char] = IArray(a, b, c, d, e)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; iarray.IArray[B])iarray.IArray[B]" id="iarray;IArray.flatMap">flatMap</a><span class="delimiter">[</span><a title="" id="iarray;IArray.flatMap;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; iarray.IArray[B]" id="iarray;IArray.flatMap.f">f</a>: A =&gt; IArray<span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" id="iarray;IArray.flatMap.builder">builder</a> = <span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" class="keyword">new</span> ArrayBuilder.<span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">ofRef</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.flatMap.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.flatMap.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.flatMap.while$51" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="iarray.IArray[B]" id="iarray;IArray.flatMap.x">x</a> = <a href="#iarray;IArray.flatMap.f" title="(v1: A)iarray.IArray[B]">f</a><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.flatMap.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.flatMap.j">j</a> = <span title="Int(0)" class="int">0</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.flatMap.j" title="Int">j</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.flatMap.x" title="iarray.IArray[B]">x</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span><a href="#iarray;IArray.flatMap.while$50" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.flatMap.builder" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">builder</a> <span title="(elem: AnyRef)builder.type">+=</span> <a href="#iarray;IArray.apply" title="(i: Int)B">x</a><span class="delimiter">(</span><a href="#iarray;IArray.flatMap.j" title="Int">j</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
        <a href="#iarray;IArray.flatMap.j" title="Int">j</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.flatMap.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.flatMap.builder" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">builder</a>.<span title="()Array[AnyRef]">result</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">// unsafe</span>
  <span class="keyword">private</span><span class="delimiter">[</span>iarray<span class="delimiter">]</span> <span class="keyword">def</span> <a title="[B](z: A =&gt; B)(f: (A, B) =&gt; B)B" id="iarray;IArray.foldMapR1">foldMapR1</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foldMapR1;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.foldMapR1.z">z</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><a title="(A, B) =&gt; B" id="iarray;IArray.foldMapR1.f">f</a>: <span class="delimiter">(</span>A, B<span class="delimiter">)</span> =&gt; B<span class="delimiter">)</span>: <a href="#iarray;IArray.foldMapR1;B" title="B">B</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.foldMapR1.acc">acc</a> = <a href="#iarray;IArray.foldMapR1.z" title="(v1: A)B">z</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foldMapR1.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(2)" class="int">2</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMapR1.i" title="Int">i</a> <span title="(x: Int)Boolean">&gt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><a href="#iarray;IArray.foldMapR1.while$52" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.foldMapR1.acc" title="B">acc</a> = <a href="#iarray;IArray.foldMapR1.f" title="(v1: A, v2: B)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.foldMapR1.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.foldMapR1.acc" title="B">acc</a><span class="delimiter">)</span>
      <a href="#iarray;IArray.foldMapR1.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.foldMapR1.acc" title="B">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](z: A =&gt; B)(f: (A, B) =&gt; B)Option[B]" id="iarray;IArray.foldMapR1Opt">foldMapR1Opt</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foldMapR1Opt;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.foldMapR1Opt.z">z</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><a title="(A, B) =&gt; B" id="iarray;IArray.foldMapR1Opt.f">f</a>: <span class="delimiter">(</span>A, B<span class="delimiter">)</span> =&gt; B<span class="delimiter">)</span>: <span title="Option[B]">Option</span><span class="delimiter">[</span>B<span class="delimiter">]</span> =
    <span title="Option[B]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="(x: B)Some[B]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMapR1" title="(z: A =&gt; B)(f: (A, B) =&gt; B)B">foldMapR1</a><span class="delimiter">(</span><a href="#iarray;IArray.foldMapR1Opt.z" title="A =&gt; B">z</a><span class="delimiter">)</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMapR1Opt.f" title="(A, B) =&gt; B">f</a><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](z: A =&gt; B)(f: (B, A) =&gt; B)Option[B]" id="iarray;IArray.foldMapL1">foldMapL1</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foldMapL1;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.foldMapL1.z">z</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><a title="(B, A) =&gt; B" id="iarray;IArray.foldMapL1.f">f</a>: <span class="delimiter">(</span>B, A<span class="delimiter">)</span> =&gt; B<span class="delimiter">)</span>: <span title="Option[B]">Option</span><span class="delimiter">[</span>B<span class="delimiter">]</span> =
    <span title="Option[B]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span> <span class="keyword">else</span> <span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="B" id="iarray;IArray.foldMapL1.acc">acc</a> = <a href="#iarray;IArray.foldMapL1.z" title="(v1: A)B">z</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foldMapL1.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMapL1.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.foldMapL1.while$53" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.foldMapL1.acc" title="B">acc</a> = <a href="#iarray;IArray.foldMapL1.f" title="(v1: B, v2: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.foldMapL1.acc" title="B">acc</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.foldMapL1.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.foldMapL1.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="(x: B)Some[B]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMapL1.acc" title="B">acc</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: (A, A) =&gt; A)Option[A]" id="iarray;IArray.foldl1">foldl1</a><span class="delimiter">(</span><a title="(A, A) =&gt; A" id="iarray;IArray.foldl1.f">f</a>: <span class="delimiter">(</span>A, A<span class="delimiter">)</span> =&gt; A<span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foldl1.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span class="keyword">var</span> <a title="A" id="iarray;IArray.foldl1.acc">acc</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foldl1.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.foldl1.while$54" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.foldl1.acc" title="A">acc</a> = <a href="#iarray;IArray.foldl1.f" title="(v1: A, v2: A)A">f</a><span class="delimiter">(</span><a href="#iarray;IArray.foldl1.acc" title="A">acc</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.foldl1.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.foldl1.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.foldl1.acc" title="A">acc</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](z: B)(f: (B, A) =&gt; B)B" id="iarray;IArray.foldl">foldl</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foldl;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="B" id="iarray;IArray.foldl.z">z</a>: <a href="#iarray;IArray.foldl;B" title="B">B</a><span class="delimiter">)</span><span class="delimiter">(</span><a title="(B, A) =&gt; B" id="iarray;IArray.foldl.f">f</a>: <span class="delimiter">(</span>B, A<span class="delimiter">)</span> =&gt; B<span class="delimiter">)</span>: <a href="#iarray;IArray.foldl;B" title="B">B</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foldl.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.foldl.acc">acc</a> = <a href="#iarray;IArray.foldl.z" title="B">z</a>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foldl.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.foldl.while$55" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.foldl.acc" title="B">acc</a> = <a href="#iarray;IArray.foldl.f" title="(v1: B, v2: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.foldl.acc" title="B">acc</a>, <a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.foldl.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.foldl.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.foldl.acc" title="B">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(123, 23, 9, 54).foldMap(_.toString.size)
   * res0: Int = 8
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit B: scalaz.Monoid[B])B" id="iarray;IArray.foldMap">foldMap</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foldMap;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.foldMap.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Monoid[B]" id="iarray;IArray.foldMap.B">B</a>: <span title="scalaz.Monoid[B]">Monoid</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray.foldMap;B" title="B">B</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foldMap.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.foldMap.acc">acc</a> = <a href="#iarray;IArray.foldMap.B" title="scalaz.Monoid[B]">B</a>.<span title="=&gt; B">zero</span>
    <span class="keyword">val</span> <a title="AnyRef =&gt; B" id="iarray;IArray.foldMap.f0">f0</a> = <a href="#iarray;IArray.foldMap.f" title="A =&gt; B">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef =&gt; B" class="delimiter">[</span>AnyRef =&gt; B<span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMap.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.foldMap.while$56" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.foldMap.acc" title="B">acc</a> = <a href="#iarray;IArray.foldMap.B" title="scalaz.Monoid[B]">B</a>.<span title="(f1: B, f2: =&gt; B)B">append</span><span class="delimiter">(</span><a href="#iarray;IArray.foldMap.acc" title="B">acc</a>, <a href="#iarray;IArray.foldMap.f0" title="(v1: AnyRef)B">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.foldMap.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.foldMap.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.foldMap.acc" title="B">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](z: B)(f: (A, B) =&gt; B)B" id="iarray;IArray.foldr">foldr</a><span class="delimiter">[</span><a title="" id="iarray;IArray.foldr;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="B" id="iarray;IArray.foldr.z">z</a>: <a href="#iarray;IArray.foldr;B" title="B">B</a><span class="delimiter">)</span><span class="delimiter">(</span><a title="(A, B) =&gt; B" id="iarray;IArray.foldr.f">f</a>: <span class="delimiter">(</span>A, B<span class="delimiter">)</span> =&gt; B<span class="delimiter">)</span>: <a href="#iarray;IArray.foldr;B" title="B">B</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foldr.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span class="keyword">var</span> <a title="B" id="iarray;IArray.foldr.acc">acc</a> = <a href="#iarray;IArray.foldr.z" title="B">z</a>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foldr.i" title="Int">i</a> <span title="(x: Int)Boolean">&gt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><a href="#iarray;IArray.foldr.while$57" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.foldr.acc" title="B">acc</a> = <a href="#iarray;IArray.foldr.f" title="(v1: A, v2: B)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.foldr.i" title="Int">i</a><span class="delimiter">)</span>, <a href="#iarray;IArray.foldr.acc" title="B">acc</a><span class="delimiter">)</span>
      <a href="#iarray;IArray.foldr.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.foldr.acc" title="B">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: (A, A) =&gt; A)Option[A]" id="iarray;IArray.foldr1">foldr1</a><span class="delimiter">(</span><a title="(A, A) =&gt; A" id="iarray;IArray.foldr1.f">f</a>: <span class="delimiter">(</span>A, A<span class="delimiter">)</span> =&gt; A<span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span> <span title="None.type">None</span>
    <span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.foldr1.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(2)" class="int">2</span>
      <span class="keyword">var</span> <a title="A" id="iarray;IArray.foldr1.acc">acc</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.foldr1.i" title="Int">i</a> <span title="(x: Int)Boolean">&gt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><a href="#iarray;IArray.foldr1.while$58" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.foldr1.acc" title="A">acc</a> = <a href="#iarray;IArray.foldr1.f" title="(v1: A, v2: A)A">f</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.foldr1.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.foldr1.acc" title="A">acc</a><span class="delimiter">)</span>
        <a href="#iarray;IArray.foldr1.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.foldr1.acc" title="A">acc</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](z: B)(f: (B, A) =&gt; B)iarray.IArray[B]" id="iarray;IArray.scanLeft">scanLeft</a><span class="delimiter">[</span><a title="" id="iarray;IArray.scanLeft;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="B" id="iarray;IArray.scanLeft.z">z</a>: <a href="#iarray;IArray.scanLeft;B" title="B">B</a><span class="delimiter">)</span><span class="delimiter">(</span><a title="(B, A) =&gt; B" id="iarray;IArray.scanLeft.f">f</a>: <span class="delimiter">(</span>B, A<span class="delimiter">)</span> =&gt; B<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.scanLeft.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>
    <a href="#iarray;IArray.scanLeft.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span> = <a href="#iarray;IArray.scanLeft.z" title="B">z</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.scanLeft.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="(AnyRef, AnyRef) =&gt; AnyRef" id="iarray;IArray.scanLeft.f0">f0</a> = <a href="#iarray;IArray.scanLeft.f" title="(B, A) =&gt; B">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="(AnyRef, AnyRef) =&gt; AnyRef" class="delimiter">[</span><span class="delimiter">(</span>AnyRef, AnyRef<span class="delimiter">)</span> =&gt; AnyRef<span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.scanLeft.while$59" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.scanLeft.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft.i" title="Int">i</a> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.scanLeft.f0" title="(v1: AnyRef, v2: AnyRef)AnyRef">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft.array" title="(i: Int)AnyRef">array</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft.i" title="Int">i</a><span class="delimiter">)</span>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.scanLeft.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](z: B)(f: (A, B) =&gt; B)iarray.IArray[B]" id="iarray;IArray.scanRight">scanRight</a><span class="delimiter">[</span><a title="" id="iarray;IArray.scanRight;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="B" id="iarray;IArray.scanRight.z">z</a>: <a href="#iarray;IArray.scanRight;B" title="B">B</a><span class="delimiter">)</span><span class="delimiter">(</span><a title="(A, B) =&gt; B" id="iarray;IArray.scanRight.f">f</a>: <span class="delimiter">(</span>A, B<span class="delimiter">)</span> =&gt; B<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.scanRight.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>
    <a href="#iarray;IArray.scanRight.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span> = <a href="#iarray;IArray.scanRight.z" title="B">z</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.scanRight.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>
    <span class="keyword">val</span> <a title="(AnyRef, AnyRef) =&gt; AnyRef" id="iarray;IArray.scanRight.f0">f0</a> = <a href="#iarray;IArray.scanRight.f" title="(A, B) =&gt; B">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="(AnyRef, AnyRef) =&gt; AnyRef" class="delimiter">[</span><span class="delimiter">(</span>AnyRef, AnyRef<span class="delimiter">)</span> =&gt; AnyRef<span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.scanRight.i" title="Int">i</a> <span title="(x: Int)Boolean">&gt;</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><a href="#iarray;IArray.scanRight.while$60" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.scanRight.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.scanRight.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.scanRight.f0" title="(v1: AnyRef, v2: AnyRef)AnyRef">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.scanRight.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>, <a href="#iarray;IArray.scanRight.array" title="(i: Int)AnyRef">array</a><span class="delimiter">(</span><a href="#iarray;IArray.scanRight.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.scanRight.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.scanRight.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: (A, A) =&gt; A)iarray.IArray[A]" id="iarray;IArray.scanLeft1">scanLeft1</a><span class="delimiter">(</span><a title="(A, A) =&gt; A" id="iarray;IArray.scanLeft1.f">f</a>: <span class="delimiter">(</span>A, A<span class="delimiter">)</span> =&gt; A<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">!=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.scanLeft1.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.scanLeft1.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.scanLeft1.i">i</a> = <span title="Int(0)" class="int">0</span>
      <span class="keyword">val</span> <a title="(AnyRef, AnyRef) =&gt; AnyRef" id="iarray;IArray.scanLeft1.f0">f0</a> = <a href="#iarray;IArray.scanLeft1.f" title="(A, A) =&gt; A">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="(AnyRef, AnyRef) =&gt; AnyRef" class="delimiter">[</span><span class="delimiter">(</span>AnyRef, AnyRef<span class="delimiter">)</span> =&gt; AnyRef<span class="delimiter">]</span>
      <span class="keyword">val</span> <a title="Int" id="iarray;IArray.scanLeft1.len">len</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft1.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.scanLeft1.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.scanLeft1.while$61" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.scanLeft1.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft1.i" title="Int">i</a> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.scanLeft1.f0" title="(v1: AnyRef, v2: AnyRef)AnyRef">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft1.array" title="(i: Int)AnyRef">array</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft1.i" title="Int">i</a><span class="delimiter">)</span>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft1.i" title="Int">i</a> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.scanLeft1.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.scanLeft1.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="iarray.IArray[A]">empty</a>

  <span class="comment">/**
   * @example{{{
   * scala&gt;
   * res0: =
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: (A, A) =&gt; A)iarray.IArray[A]" id="iarray;IArray.scanRight1">scanRight1</a><span class="delimiter">(</span><a title="(A, A) =&gt; A" id="iarray;IArray.scanRight1.f">f</a>: <span class="delimiter">(</span>A, A<span class="delimiter">)</span> =&gt; A<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">!=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.scanRight1.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.scanRight1.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.scanRight1.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
      <span class="keyword">val</span> <a title="(AnyRef, AnyRef) =&gt; AnyRef" id="iarray;IArray.scanRight1.f0">f0</a> = <a href="#iarray;IArray.scanRight1.f" title="(A, A) =&gt; A">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="(AnyRef, AnyRef) =&gt; AnyRef" class="delimiter">[</span><span class="delimiter">(</span>AnyRef, AnyRef<span class="delimiter">)</span> =&gt; AnyRef<span class="delimiter">]</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.scanRight1.i" title="Int">i</a> <span title="(x: Int)Boolean">&gt;</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><a href="#iarray;IArray.scanRight1.while$62" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.scanRight1.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.scanRight1.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.scanRight1.f0" title="(v1: AnyRef, v2: AnyRef)AnyRef">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.scanRight1.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>, <a href="#iarray;IArray.scanRight1.array" title="(i: Int)AnyRef">array</a><span class="delimiter">(</span><a href="#iarray;IArray.scanRight1.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.scanRight1.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.scanRight1.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="iarray.IArray[A]">empty</a>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(1, 2, 3, 4, 5) startsWith IArray(1, 2)
   * res0: Boolean = true
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(that: iarray.IArray[A], offset: Int)(implicit A: scalaz.Equal[A])Boolean" id="iarray;IArray.startsWith">startsWith</a><span class="delimiter">(</span><a title="iarray.IArray[A]" id="iarray;IArray.startsWith.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span>, <a title="Int" id="iarray;IArray.startsWith$default$2">offset</a>: <span title="Int">Int</span> = <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Equal[A]" id="iarray;IArray.startsWith.A">A</a>: <span title="scalaz.Equal[A]">Equal</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Boolean">Boolean</span> = <span class="delimiter">{</span>
    <span title="(requirement: Boolean, message: =&gt; Any)Unit">require</span><span class="delimiter">(</span><a href="#iarray;IArray.startsWith$default$2" title="Int">offset</a> <span title="(x: Int)Boolean">&gt;=</span> <span title="Int(0)" class="int">0</span>, <span title="String(&quot;offset = &quot;)" class="string">&quot;offset = &quot;</span> <span title="(x$1: Any)String">+</span> <a href="#iarray;IArray.startsWith$default$2" title="Int">offset</a>  <span title="(x$1: Any)String">+</span> <span title="String(&quot; is invalid. offset must be positive&quot;)" class="string">&quot; is invalid. offset must be positive&quot;</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.startsWith.i">i</a> = <a href="#iarray;IArray.startsWith$default$2" title="Int">offset</a>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.startsWith.j">j</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.startsWith.thisLen">thisLen</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.startsWith.thatLen">thatLen</a> = <a href="#iarray;IArray.startsWith.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a>
    <span title="Unit" class="keyword">while</span> <span class="delimiter">(</span><a href="#iarray;IArray.startsWith.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.startsWith.thisLen" title="Int">thisLen</a> <span title="(x: Boolean)Boolean">&amp;&amp;</span> <a href="#iarray;IArray.startsWith.j" title="Int">j</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.startsWith.thatLen" title="Int">thatLen</a> <span title="(x: Boolean)Boolean">&amp;&amp;</span> <a href="#iarray;IArray.startsWith.A" title="scalaz.Equal[A]">A</a>.<span title="(a1: A, a2: A)Boolean">equal</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.startsWith.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.apply" title="(i: Int)A">that</a><span class="delimiter">(</span><a href="#iarray;IArray.startsWith.j" title="Int">j</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span> <a href="#iarray;IArray.startsWith.while$63" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.startsWith.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <a href="#iarray;IArray.startsWith.j" title="Int">j</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.startsWith.j" title="Int">j</a> <span title="(x: Int)Boolean">==</span> <a href="#iarray;IArray.startsWith.thatLen" title="Int">thatLen</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(1, 2, 3, 4, 5) endsWith IArray(3, 4, 5)
   * res0: Boolean = true
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(that: iarray.IArray[A])(implicit A: scalaz.Equal[A])Boolean" id="iarray;IArray.endsWith">endsWith</a><span class="delimiter">(</span><a title="iarray.IArray[A]" id="iarray;IArray.endsWith.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Equal[A]" id="iarray;IArray.endsWith.A">A</a>: <span title="scalaz.Equal[A]">Equal</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Boolean">Boolean</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.endsWith.i">i</a> = <a href="#iarray;IArray.length" title="=&gt; Int">length</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.endsWith.j">j</a> = <a href="#iarray;IArray.endsWith.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>

    <span class="delimiter">(</span><a href="#iarray;IArray.endsWith.j" title="Int">j</a> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.endsWith.i" title="Int">i</a><span class="delimiter">)</span> <span title="(x: Boolean)Boolean">&amp;&amp;</span> <span class="delimiter">{</span>
      <span title="Unit" class="keyword">while</span> <span class="delimiter">(</span><a href="#iarray;IArray.endsWith.j" title="Int">j</a> <span title="(x: Int)Boolean">&gt;=</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><a href="#iarray;IArray.endsWith.while$64" title="()Unit" class="delimiter">{</a>
        <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><span title="Boolean(false)" class="keyword">false</span> <span title="(x: Boolean)Boolean">==</span> <a href="#iarray;IArray.endsWith.A" title="scalaz.Equal[A]">A</a>.<span title="(a1: A, a2: A)Boolean">equal</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.endsWith.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray.apply" title="(i: Int)A">that</a><span class="delimiter">(</span><a href="#iarray;IArray.endsWith.j" title="Int">j</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
          <span title="Nothing" class="keyword">return</span> <span title="Boolean(false)" class="keyword">false</span>
        <span class="delimiter">}</span>
        <a href="#iarray;IArray.endsWith.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
        <a href="#iarray;IArray.endsWith.j" title="Int">j</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="Boolean(true)" class="keyword">true</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(2, 8, 11, -2, 5, 6).span(_ % 2 == 0)
   * res0: (IArray[Int], IArray[Int]) = (IArray(2, 8),IArray(11, -2, 5, 6))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)(iarray.IArray[A], iarray.IArray[A])" id="iarray;IArray.span">span</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.span.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span>IArray<span class="delimiter">[</span>A<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.span.n">n</a> = <a href="#iarray;IArray.indexNot" title="(f: A =&gt; Boolean)Int">indexNot</a><span class="delimiter">(</span><a href="#iarray;IArray.span.f" title="A =&gt; Boolean">f</a><span class="delimiter">)</span>
    <span title="(iarray.IArray[A], iarray.IArray[A])" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.span.n" title="Int">n</a> <span title="(x: Int)Boolean">&lt;</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="(_1: iarray.IArray[A], _2: iarray.IArray[A])(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span><a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a>, <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="(iarray.IArray[A], iarray.IArray[A])" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.span.n" title="Int">n</a> <span title="(x: Int)Boolean">&gt;=</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="(_1: iarray.IArray[A], _2: iarray.IArray[A])(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span><a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>, <a href="#iarray;IArray" title="iarray.IArray[A]" class="keyword">this</a><span class="delimiter">)</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span title="(_1: iarray.IArray[A], _2: iarray.IArray[A])(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span><span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int)Array[AnyRef]">copyOf</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.span.n" title="Int">n</a><span class="delimiter">)</span><span class="delimiter">)</span>, <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><span title="(x$1: Array[AnyRef], x$2: Int, x$3: Int)Array[AnyRef]">copyOfRange</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.span.n" title="Int">n</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(2, 8, 11, -2, 5, 6).partition(_ % 2 == 0)
   * res0: (IArray[Int], IArray[Int]) = (IArray(2, 8, -2, 6),IArray(11, 5))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)(iarray.IArray[A], iarray.IArray[A])" id="iarray;IArray.partition">partition</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.partition.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span>IArray<span class="delimiter">[</span>A<span class="delimiter">]</span>, IArray<span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" id="iarray;IArray.partition.l">l</a>, <a title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" id="iarray;IArray.partition.r">r</a> = <span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" class="keyword">new</span> ArrayBuilder.<span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">ofRef</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.partition.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="AnyRef =&gt; Boolean" id="iarray;IArray.partition.f0">f0</a> = <a href="#iarray;IArray.partition.f" title="A =&gt; Boolean">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef =&gt; Boolean" class="delimiter">[</span>AnyRef =&gt; Boolean<span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.partition.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.partition.while$65" title="()Unit" class="delimiter">{</a>
      <span title="l.type" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.partition.f0" title="(v1: AnyRef)Boolean">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.partition.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <a href="#iarray;IArray.partition.l" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">l</a> <span title="(elem: AnyRef)l.type">+=</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.partition.i" title="Int">i</a><span class="delimiter">)</span>
      <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
        <a href="#iarray;IArray.partition.r" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">r</a> <span title="(elem: AnyRef)r.type">+=</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.partition.i" title="Int">i</a><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.partition.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="(_1: iarray.IArray[A], _2: iarray.IArray[A])(iarray.IArray[A], iarray.IArray[A])" class="delimiter">(</span><span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.partition.l" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">l</a>.<span title="()Array[AnyRef]">result</span><span class="delimiter">)</span>, <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.partition.r" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">r</a>.<span title="()Array[AnyRef]">result</span><span class="delimiter">)</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;).updated(2, &quot;z&quot;)
   * res0: IArray[String] = IArray(a, b, z, d)
   * }}}
   */</span>
  @throws<span class="delimiter">[</span>IndexOutOfBoundsException<span class="delimiter">]</span>
  <span class="keyword">def</span> <a title="(index: Int, elem: A)iarray.IArray[A]" id="iarray;IArray.updated">updated</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.updated.index">index</a>: <span title="Int">Int</span>, <a title="A" id="iarray;IArray.updated.elem">elem</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.updated.array">array</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="()Array[AnyRef]">clone</span>
    <a href="#iarray;IArray.updated.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.updated.index" title="Int">index</a><span class="delimiter">)</span> = <a href="#iarray;IArray.updated.elem" title="A">elem</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
    <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.updated.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray[Seq[Int]](Vector(1), List(2), Vector(3), List(4)).collectBy[Vector[Int]]
   * res0: IArray[Vector[Int]] = IArray(Vector(1), Vector(3))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](implicit B: scala.reflect.ClassTag[B])iarray.IArray[B]" id="iarray;IArray.collectBy">collectBy</a><span class="delimiter">[</span><a title="" id="iarray;IArray.collectBy;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scala.reflect.ClassTag[B]" id="iarray;IArray.collectBy.B">B</a>: reflect.<span title="scala.reflect.ClassTag[B]">ClassTag</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" id="iarray;IArray.collectBy.builder">builder</a> = <span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" class="keyword">new</span> ArrayBuilder.<span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">ofRef</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.collectBy.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.collectBy.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.collectBy.while$66" title="()Unit" class="delimiter">{</a>
      <span title="Any" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.collectBy.B" title="scala.reflect.ClassTag[B]">B</a>.<span title="=&gt; Class[_]">runtimeClass</span>.<span title="(x$1: Any)Boolean">isInstance</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.collectBy.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <a href="#iarray;IArray.collectBy.builder" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">builder</a> <span title="(elem: AnyRef)builder.type">+=</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.collectBy.i" title="Int">i</a><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.collectBy.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.collectBy.builder" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">builder</a>.<span title="()Array[AnyRef]">result</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5, 6, 7).collect{ case i if i &gt; 3 =&gt; i * 10 }
   * res0: IArray[Int] = IArray(40, 50, 60, 70)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: PartialFunction[A,B])iarray.IArray[B]" id="iarray;IArray.collect">collect</a><span class="delimiter">[</span><a title="" id="iarray;IArray.collect;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="PartialFunction[A,B]" id="iarray;IArray.collect.f">f</a>: <span title="PartialFunction[A,B]">PartialFunction</span><span class="delimiter">[</span>A, B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" id="iarray;IArray.collect.builder">builder</a> = <span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]" class="keyword">new</span> ArrayBuilder.<span title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">ofRef</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.collect.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="AnyRef =&gt; Boolean" id="iarray;IArray.collect.f0">f0</a> = <a href="#iarray;IArray.collect.f" title="PartialFunction[A,B]">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="PartialFunction[AnyRef,AnyRef]" class="delimiter">[</span><span title="PartialFunction[AnyRef,AnyRef]">PartialFunction</span><span class="delimiter">[</span>AnyRef, AnyRef<span class="delimiter">]</span><span class="delimiter">]</span>.<span title="(action: AnyRef =&gt; scala.collection.mutable.ArrayBuilder.ofRef[AnyRef])AnyRef =&gt; Boolean">runWith</span><span class="delimiter">(</span><a href="#iarray;IArray.collect.builder" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">builder</a> <span title="(elem: AnyRef)builder.type">+=</span> <a href="#iarray;IArray.collect.f0.$anonfun.x$1" title="AnyRef">_</a><span class="delimiter">)</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.collect.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.collect.while$67" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.collect.f0" title="(v1: AnyRef)Boolean">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.collect.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.collect.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.collect.builder" title="scala.collection.mutable.ArrayBuilder.ofRef[AnyRef]">builder</a>.<span title="()Array[AnyRef]">result</span><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4).reverseMap(_ * 3)
   * res0: IArray[Int] = IArray(12, 9, 6, 3)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)iarray.IArray[B]" id="iarray;IArray.reverseMap">reverseMap</a><span class="delimiter">[</span><a title="" id="iarray;IArray.reverseMap;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.reverseMap.f">f</a>: A =&gt; B<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.reverseMap.len">len</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.reverseMap.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.reverseMap.len" title="Int">len</a><span class="delimiter">)</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.reverseMap.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="AnyRef =&gt; AnyRef" id="iarray;IArray.reverseMap.f0">f0</a> = <a href="#iarray;IArray.reverseMap.f" title="A =&gt; B">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef =&gt; AnyRef" class="delimiter">[</span>AnyRef =&gt; AnyRef<span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.reverseMap.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.reverseMap.len" title="Int">len</a><span class="delimiter">)</span><a href="#iarray;IArray.reverseMap.while$68" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.reverseMap.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.reverseMap.len" title="Int">len</a> <span title="(x: Int)Int">-</span> <a href="#iarray;IArray.reverseMap.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.reverseMap.f0" title="(v1: AnyRef)AnyRef">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.reverseMap.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.reverseMap.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.reverseMap.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5, 6, 7).collectFirst{ case i if i &gt; 3 =&gt; i * 10 }
   * res0: Option[Int] = Some(40)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: PartialFunction[A,B])Option[B]" id="iarray;IArray.collectFirst">collectFirst</a><span class="delimiter">[</span><a title="" id="iarray;IArray.collectFirst;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="PartialFunction[A,B]" id="iarray;IArray.collectFirst.f">f</a>: <span title="PartialFunction[A,B]">PartialFunction</span><span class="delimiter">[</span>A, B<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[B]">Option</span><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.collectFirst.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="PartialFunction[AnyRef,B]" id="iarray;IArray.collectFirst.f0">f0</a> = <a href="#iarray;IArray.collectFirst.f" title="PartialFunction[A,B]">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="PartialFunction[AnyRef,B]" class="delimiter">[</span><span title="PartialFunction[AnyRef,B]">PartialFunction</span><span class="delimiter">[</span>AnyRef, B<span class="delimiter">]</span><span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.collectFirst.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.collectFirst.while$69" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.collectFirst.f0" title="PartialFunction[AnyRef,B]">f0</a> <span title="(x: AnyRef)Boolean">isDefinedAt</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.collectFirst.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <span title="(x: B)Some[B]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.collectFirst.f0" title="(v1: AnyRef)B">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.collectFirst.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.collectFirst.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="None.type">None</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4, 5, 6, 7).collectLast{ case i if i &lt; 3 =&gt; i * 10 }
   * res0: Option[Int] = Some(20)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: PartialFunction[A,B])Option[B]" id="iarray;IArray.collectLast">collectLast</a><span class="delimiter">[</span><a title="" id="iarray;IArray.collectLast;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="PartialFunction[A,B]" id="iarray;IArray.collectLast.f">f</a>: <span title="PartialFunction[A,B]">PartialFunction</span><span class="delimiter">[</span>A, B<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[B]">Option</span><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.collectLast.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span class="keyword">val</span> <a title="PartialFunction[AnyRef,B]" id="iarray;IArray.collectLast.f0">f0</a> = <a href="#iarray;IArray.collectLast.f" title="PartialFunction[A,B]">f</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="PartialFunction[AnyRef,B]" class="delimiter">[</span><span title="PartialFunction[AnyRef,B]">PartialFunction</span><span class="delimiter">[</span>AnyRef, B<span class="delimiter">]</span><span class="delimiter">]</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><span title="Int(0)" class="int">0</span> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.collectLast.i" title="Int">i</a><span class="delimiter">)</span><a href="#iarray;IArray.collectLast.while$70" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.collectLast.f0" title="PartialFunction[AnyRef,B]">f0</a> <span title="(x: AnyRef)Boolean">isDefinedAt</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.collectLast.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <span title="(x: B)Some[B]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.collectLast.f0" title="(v1: AnyRef)B">f0</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.collectLast.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.collectLast.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="None.type">None</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(-1, 0, 1, 2, -1, 0, 1, 2).indexOfL(2)
   * res0: Option[Int] = Some(3)
   * scala&gt; IArray(1, 2, 3, 1, 2, 3).indexOfL(5)
   * res1: Option[Int] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(a: A)(implicit E: scalaz.Equal[A])Option[Int]" id="iarray;IArray.indexOfL">indexOfL</a><span class="delimiter">(</span><a title="A" id="iarray;IArray.indexOfL.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Equal[A]" id="iarray;IArray.indexOfL.E">E</a>: <span title="scalaz.Equal[A]">Equal</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[Int]">Option</span><span class="delimiter">[</span>Int<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.indexOfL.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.indexOfL.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.indexOfL.while$71" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.indexOfL.E" title="scalaz.Equal[A]">E</a>.<span title="(a1: A, a2: A)Boolean">equal</span><span class="delimiter">(</span><a href="#iarray;IArray.indexOfL.a" title="A">a</a>, <a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.indexOfL.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <span title="(x: Int)Some[Int]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.indexOfL.i" title="Int">i</a><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.indexOfL.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="None.type">None</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(1, 2, 3, 1, 2, 3).indexOfR(1)
   * res0: Option[Int] = Some(3)
   * scala&gt; IArray(1, 2, 3, 1, 2, 3).indexOfR(5)
   * res1: Option[Int] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(a: A)(implicit E: scalaz.Equal[A])Option[Int]" id="iarray;IArray.indexOfR">indexOfR</a><span class="delimiter">(</span><a title="A" id="iarray;IArray.indexOfR.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Equal[A]" id="iarray;IArray.indexOfR.E">E</a>: <span title="scalaz.Equal[A]">Equal</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[Int]">Option</span><span class="delimiter">[</span>Int<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.indexOfR.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><span title="Int(0)" class="int">0</span> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.indexOfR.i" title="Int">i</a><span class="delimiter">)</span><a href="#iarray;IArray.indexOfR.while$72" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.indexOfR.E" title="scalaz.Equal[A]">E</a>.<span title="(a1: A, a2: A)Boolean">equal</span><span class="delimiter">(</span><a href="#iarray;IArray.indexOfR.a" title="A">a</a>, <a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.indexOfR.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <span title="(x: Int)Some[Int]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.indexOfR.i" title="Int">i</a><span class="delimiter">)</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.indexOfR.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="None.type">None</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(10, 20, 30).sum
   * res0: Int = 60
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(implicit A: Numeric[A])A" id="iarray;IArray.sum">sum</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="Numeric[A]" id="iarray;IArray.sum.A">A</a>: <span title="Numeric[A]">Numeric</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray;A" title="A">A</a> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.sum.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">var</span> <a title="A" id="iarray;IArray.sum.acc">acc</a>: <a href="#iarray;IArray;A" title="A">A</a> = <a href="#iarray;IArray.sum.A" title="Numeric[A]">A</a>.<span title="=&gt; A">zero</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.sum.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.sum.while$73" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.sum.acc" title="A">acc</a> = <a href="#iarray;IArray.sum.A" title="Numeric[A]">A</a>.<span title="(x: A, y: A)A">plus</span><span class="delimiter">(</span><a href="#iarray;IArray.sum.acc" title="A">acc</a>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.sum.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.sum.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.sum.acc" title="A">acc</a>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.string._
   * scala&gt; IArray(&quot;y&quot;, &quot;k&quot;, &quot;f&quot;, &quot;i&quot;, &quot;t&quot;, &quot;s&quot;).sorted
   * res0: IArray[String] = IArray(f, i, k, s, t, y)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(implicit O: scalaz.Order[A])iarray.IArray[A]" id="iarray;IArray.sorted">sorted</a><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[A]" id="iarray;IArray.sorted.O">O</a>: <span title="scalaz.Order[A]">Order</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <a href="#iarray;IArray.sort0" title="(c: java.util.Comparator[A])iarray.IArray[A]">sort0</a><span class="delimiter">(</span><a href="#iarray;IArray.sorted.O" title="scalaz.Order[A]">O</a>.<span title="=&gt; scala.math.Ordering[A]">toScalaOrdering</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(2, 7, 4, 6, 1).sortWith(_ &gt; _)
   * res0: IArray[Int] = IArray(7, 6, 4, 2, 1)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(f: (A, A) =&gt; Boolean)iarray.IArray[A]" id="iarray;IArray.sortWith">sortWith</a><span class="delimiter">(</span><a title="(A, A) =&gt; Boolean" id="iarray;IArray.sortWith.f">f</a>: <span class="delimiter">(</span>A, A<span class="delimiter">)</span> =&gt; Boolean<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <a href="#iarray;IArray.sort0" title="(c: java.util.Comparator[A])iarray.IArray[A]">sort0</a><span class="delimiter">(</span><a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.comparatorFromFunction" title="(f: (A, A) =&gt; Boolean)java.util.Comparator[A]">comparatorFromFunction</a><span class="delimiter">(</span><a href="#iarray;IArray.sortWith.f" title="(A, A) =&gt; Boolean">f</a><span class="delimiter">)</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(&quot;aaaa&quot;, &quot;bb&quot;, &quot;ccccc&quot;, &quot;d&quot;).sortBy(_.length)
   * res0: IArray[String] = IArray(d, bb, aaaa, ccccc)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])iarray.IArray[A]" id="iarray;IArray.sortBy">sortBy</a><span class="delimiter">[</span><a title="" id="iarray;IArray.sortBy;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.sortBy.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.sortBy.O">O</a>: <span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <a href="#iarray;IArray.sort0" title="(c: java.util.Comparator[A])iarray.IArray[A]">sort0</a><span class="delimiter">(</span><span class="delimiter">(</span><a href="#iarray;IArray.sortBy.O" title="scalaz.Order[B]">O</a> <span title="(f: A =&gt; B)scalaz.Order[A]">contramap</span> <a href="#iarray;IArray.sortBy.f" title="A =&gt; B">f</a><span class="delimiter">)</span>.<span title="=&gt; scala.math.Ordering[A]">toScalaOrdering</span><span class="delimiter">)</span>

  <span class="keyword">private</span> <span class="keyword">def</span> <a title="[B](c: java.util.Comparator[B])iarray.IArray[B]" id="iarray;IArray.sort0">sort0</a><span class="delimiter">[</span><a title="" id="iarray;IArray.sort0;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="java.util.Comparator[B]" id="iarray;IArray.sort0.c">c</a>: java.util.<span title="java.util.Comparator[B]">Comparator</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.sort0.array">array</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="()Array[AnyRef]">clone</span>
    <span title="java.util.Arrays.type">Arrays</span>.<span title="(x$1: Array[AnyRef], x$2: java.util.Comparator[_ &gt;: AnyRef])Unit">sort</span><span class="delimiter">(</span><a href="#iarray;IArray.sort0.array" title="Array[AnyRef]">array</a>, <a href="#iarray;IArray.sort0.c" title="java.util.Comparator[B]">c</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="java.util.Comparator[AnyRef]" class="delimiter">[</span>java.util.<span title="java.util.Comparator[AnyRef]">Comparator</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">]</span><span class="delimiter">)</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.sort0.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(IArray(1, 2), IArray(3)).flatten
   * res0: IArray[Int] = IArray(1, 2, 3)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](implicit A: &lt;:&lt;[A,iarray.IArray[B]])iarray.IArray[B]" id="iarray;IArray.flatten">flatten</a><span class="delimiter">[</span><a title="" id="iarray;IArray.flatten;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,iarray.IArray[B]]" id="iarray;IArray.flatten.A">A</a>: A <span title="&lt;:&lt;[A,iarray.IArray[B]]">&lt;:&lt;</span> IArray<span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.flatten.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.flatten.n">n</a> = <span title="Int(0)" class="int">0</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.flatten.length">length</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.flatten.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.flatten.length" title="Int">length</a><span class="delimiter">)</span><a href="#iarray;IArray.flatten.while$74" title="()Unit" class="delimiter">{</a>
      <a href="#iarray;IArray.flatten.n" title="Int">n</a> <span title="(x: Int)Int">+=</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.flatten.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="iarray.IArray[B]" class="delimiter">[</span><a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">]</span>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a>
      <a href="#iarray;IArray.flatten.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.flatten.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.flatten.n" title="Int">n</a><span class="delimiter">)</span>
    <a href="#iarray;IArray.flatten.i" title="Int">i</a> = <span title="Int(0)" class="int">0</span>
    <a href="#iarray;IArray.flatten.n" title="Int">n</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.flatten.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.flatten.length" title="Int">length</a><span class="delimiter">)</span><a href="#iarray;IArray.flatten.while$75" title="()Unit" class="delimiter">{</a>
      <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.flatten.elem">elem</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.flatten.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="iarray.IArray[B]" class="delimiter">[</span><a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">]</span>.<a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>
      <span title="System.type">System</span>.<span title="(x$1: Any, x$2: Int, x$3: Any, x$4: Int, x$5: Int)Unit">arraycopy</span><span class="delimiter">(</span><a href="#iarray;IArray.flatten.elem" title="Array[AnyRef]">elem</a>, <span title="Int(0)" class="int">0</span>, <a href="#iarray;IArray.flatten.array" title="Array[AnyRef]">array</a>, <a href="#iarray;IArray.flatten.n" title="Int">n</a>, <a href="#iarray;IArray.flatten.elem" title="Array[AnyRef]">elem</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
      <a href="#iarray;IArray.flatten.n" title="Int">n</a> <span title="(x: Int)Int">+=</span> <a href="#iarray;IArray.flatten.elem" title="Array[AnyRef]">elem</a>.<span title="=&gt; Int">length</span>
      <a href="#iarray;IArray.flatten.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[B]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.flatten.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.==&gt;&gt;
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(1, 2, 3, 4, 5).groupBy1(_ % 3).toList.sortBy(_._1)
   * res0: List[(Int, IArray1[Int])] = List((0,IArray1(3)), (1,IArray1(1, 4)), (2,IArray1(2, 5)))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](f: A =&gt; B)(implicit O: scalaz.Order[B])scalaz.==&gt;&gt;[B,iarray.IArray1[A]]" id="iarray;IArray.groupBy1">groupBy1</a><span class="delimiter">[</span><a title="" id="iarray;IArray.groupBy1;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><a title="A =&gt; B" id="iarray;IArray.groupBy1.f">f</a>: A =&gt; B<span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Order[B]" id="iarray;IArray.groupBy1.O">O</a>: <span title="scalaz.Order[B]">Order</span><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">)</span>: B <span title="scalaz.==&gt;&gt;[B,iarray.IArray1[A]]">==&gt;&gt;</span> IArray1<span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <a href="#iarray;IArray.foldl" title="(z: scalaz.==&gt;&gt;[B,scalaz.OneAnd[List,A]])(f: (scalaz.==&gt;&gt;[B,scalaz.OneAnd[List,A]], A) =&gt; scalaz.==&gt;&gt;[B,scalaz.OneAnd[List,A]])scalaz.==&gt;&gt;[B,scalaz.OneAnd[List,A]]">foldl</a><span class="delimiter">(</span><span title="scalaz.==&gt;&gt;.type">==&gt;&gt;</span>.<span title="[A, B]=&gt; scalaz.==&gt;&gt;[A,B]">empty</span><span title="scalaz.==&gt;&gt;[B,scalaz.OneAnd[List,A]]" class="delimiter">[</span><a href="#iarray;IArray.groupBy1;B" title="B">B</a>, <span title="scalaz.OneAnd[List,A]">OneAnd</span><span class="delimiter">[</span>List, A<span class="delimiter">]</span><span class="delimiter">]</span><span class="delimiter">)</span> <span class="delimiter">{</span> <span class="delimiter">(</span><a title="scalaz.==&gt;&gt;[B,scalaz.OneAnd[List,A]]" id="iarray;IArray.groupBy1.$anonfun.m">m</a>, <a title="A" id="iarray;IArray.groupBy1.$anonfun.a">a</a><span class="delimiter">)</span> =&gt;
      <a href="#iarray;IArray.groupBy1.$anonfun.m" title="scalaz.==&gt;&gt;[B,scalaz.OneAnd[List,A]]">m</a>.<span title="(k: B, f: Option[scalaz.OneAnd[List,A]] =&gt; Option[scalaz.OneAnd[List,A]])(implicit o: scalaz.Order[B])scalaz.==&gt;&gt;[B,scalaz.OneAnd[List,A]]">alter</span><a href="#iarray;IArray.groupBy1.O" title="scalaz.Order[B]" class="delimiter">(</a><a href="#iarray;IArray.groupBy1.f" title="(v1: A)B">f</a><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.a" title="A">a</a><span class="delimiter">)</span>, <a href="#iarray;IArray.groupBy1.$anonfun.$anonfun.x0$1" title="Option[scalaz.OneAnd[List,A]]" class="delimiter">{</a>
        <span class="keyword">case</span> Some<span class="delimiter">(</span>OneAnd<span class="delimiter">(</span><a title="A" id="iarray;IArray.groupBy1.$anonfun.$anonfun.h">h</a>, <a title="List[A]" id="iarray;IArray.groupBy1.$anonfun.$anonfun.t">t</a><span class="delimiter">)</span><span class="delimiter">)</span> =&gt; <span title="(x: scalaz.OneAnd[List,A])Some[scalaz.OneAnd[List,A]]">Some</span><span class="delimiter">(</span><span title="(head: A, tail: List[A])scalaz.OneAnd[List,A]">OneAnd</span><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.a" title="A">a</a>, <a href="#iarray;IArray.groupBy1.$anonfun.$anonfun.h" title="A">h</a> <a href="#iarray;IArray.groupBy1.$anonfun.$anonfun.x$2" title="(x: A)List[A]">::</a> <a href="#iarray;IArray.groupBy1.$anonfun.$anonfun.t" title="List[A]">t</a><span class="delimiter">)</span><span class="delimiter">)</span>
        <span class="keyword">case</span> <span title="None.type">None</span> =&gt; <span title="(x: scalaz.OneAnd[List,A])Some[scalaz.OneAnd[List,A]]">Some</span><span class="delimiter">(</span><span title="[F[_], A](head: A, tail: F[A])scalaz.OneAnd[F,A]">OneAnd</span><span title="(head: A, tail: List[A])scalaz.OneAnd[List,A]" class="delimiter">[</span><span title="List">List</span>, <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.a" title="A">a</a>, <span title="scala.collection.immutable.Nil.type">Nil</span><span class="delimiter">)</span><span class="delimiter">)</span>
      <span class="delimiter">}</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>.<span title="(f: scalaz.OneAnd[List,A] =&gt; iarray.IArray1[A])scalaz.==&gt;&gt;[B,iarray.IArray1[A]]">map</span><a href="#iarray;IArray.groupBy1.$anonfun.x0$2" title="iarray.IArray1[A]" class="delimiter">{</a> <span class="keyword">case</span> OneAnd<span class="delimiter">(</span><a title="A" id="iarray;IArray.groupBy1.$anonfun.h">h</a>, <a title="List[A]" id="iarray;IArray.groupBy1.$anonfun.t">t</a><span class="delimiter">)</span> =&gt;
      <span title="iarray.IArray1[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.t" title="List[A]">t</a>.<span title="=&gt; Boolean">isEmpty</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <a href="IArray1.scala.html#iarray;IArray1" title="(head: A, tail: iarray.IArray[A])iarray.IArray1[A]">IArray1</a><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.h" title="A">h</a>, <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="[A]=&gt; iarray.IArray[A]">empty</a><span title="iarray.IArray[A]" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
      <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
        <span class="keyword">val</span> <a title="Int" id="iarray;IArray.groupBy1.$anonfun.len">len</a> = <a href="#iarray;IArray.groupBy1.$anonfun.t" title="List[A]">t</a>.<span title="=&gt; Int">size</span>
        <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.groupBy1.$anonfun.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.len" title="Int">len</a><span class="delimiter">)</span>
        @tailrec
        <span class="keyword">def</span> <a title="(i: Int, list: List[A])iarray.IArray1[A]" id="iarray;IArray.groupBy1.$anonfun.go">go</a><span class="delimiter">(</span><a title="Int" id="iarray;IArray.groupBy1.$anonfun.go.i">i</a>: <span title="Int">Int</span>, <a title="List[A]" id="iarray;IArray.groupBy1.$anonfun.go.list">list</a>: <span title="List[A]">List</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="IArray1.scala.html#iarray;IArray1" title="iarray.IArray1[A]">IArray1</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.go.list" title="List[A]">list</a>: @<span title="List[A] @unchecked">unchecked</span><span class="delimiter">)</span> <span title="iarray.IArray1[A]" class="keyword">match</span> <span class="delimiter">{</span>
          <span class="keyword">case</span> <span title="A">a</span> :: <a title="A" id="iarray;IArray.groupBy1.$anonfun.go.last">last</a> :: <span title="scala.collection.immutable.Nil.type">Nil</span> =&gt;
            <a href="#iarray;IArray.groupBy1.$anonfun.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.go.i" title="Int">i</a><span class="delimiter">)</span> = <span title="A">a</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
            <a href="IArray1.scala.html#iarray;IArray1" title="(head: A, tail: iarray.IArray[A])iarray.IArray1[A]">IArray1</a><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.go.last" title="A">last</a>, <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span><span class="delimiter">)</span>
          <span class="keyword">case</span> <span title="A">a</span> :: <a title="List[A]" id="iarray;IArray.groupBy1.$anonfun.go.tail">tail</a> =&gt;
            <a href="#iarray;IArray.groupBy1.$anonfun.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.go.i" title="Int">i</a><span class="delimiter">)</span> = <span title="A">a</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="AnyRef" class="delimiter">[</span><span title="AnyRef">AnyRef</span><span class="delimiter">]</span>
            <a href="#iarray;IArray.groupBy1.$anonfun.go" title="(i: Int, list: List[A])iarray.IArray1[A]">go</a><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.go.i" title="Int">i</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>, <a href="#iarray;IArray.groupBy1.$anonfun.go.tail" title="List[A]">tail</a><span class="delimiter">)</span>
        <span class="delimiter">}</span>
        <a href="#iarray;IArray.groupBy1.$anonfun.go" title="(i: Int, list: List[A])iarray.IArray1[A]">go</a><span class="delimiter">(</span><a href="#iarray;IArray.groupBy1.$anonfun.len" title="Int">len</a> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>, <a href="#iarray;IArray.groupBy1.$anonfun.h" title="A">h</a> <a href="#iarray;IArray.groupBy1.$anonfun.x$3" title="(x: A)List[A]">::</a> <a href="#iarray;IArray.groupBy1.$anonfun.t" title="List[A]">t</a><span class="delimiter">)</span>
      <span class="delimiter">}</span>
    <span class="delimiter">}</span>

  <span class="keyword">def</span> <a title="(that: iarray.IArray[A])iarray.IArray[A]" id="iarray;IArray.interleave">interleave</a><span class="delimiter">(</span><a title="iarray.IArray[A]" id="iarray;IArray.interleave.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> = <span class="delimiter">{</span>
    <span class="keyword">val</span> <a title="Int" id="iarray;IArray.interleave.len">len</a> = <span title="Math.type">Math</span>.<span title="(x$1: Int, x$2: Int)Int">min</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span>, <a href="#iarray;IArray.interleave.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.interleave.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">+</span> <a href="#iarray;IArray.interleave.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    @tailrec <span class="keyword">def</span> <a title="(isThis: Boolean, i: Int)Unit" id="iarray;IArray.interleave.loop">loop</a><span class="delimiter">(</span><a title="Boolean" id="iarray;IArray.interleave.loop.isThis">isThis</a>: <span title="Boolean">Boolean</span>, <a title="Int" id="iarray;IArray.interleave.loop.i">i</a>: <span title="Int">Int</span><span class="delimiter">)</span>: <span title="Unit">Unit</span> = <span class="delimiter">{</span>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.interleave.loop.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.interleave.len" title="Int">len</a><span class="delimiter">)</span> <span class="delimiter">{</span>
        <span title="Unit" class="keyword">if</span> <span class="delimiter">(</span><a href="#iarray;IArray.interleave.loop.isThis" title="Boolean">isThis</a><span class="delimiter">)</span> <span class="delimiter">{</span>
          <a href="#iarray;IArray.interleave.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.interleave.loop.i" title="Int">i</a> <span title="(x: Int)Int">*</span> <span title="Int(2)" class="int">2</span><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.interleave.loop.i" title="Int">i</a><span class="delimiter">)</span>
          <a href="#iarray;IArray.interleave.loop" title="(isThis: Boolean, i: Int)Unit">loop</a><span class="delimiter">(</span><span title="Boolean(false)" class="keyword">false</span>, <a href="#iarray;IArray.interleave.loop.i" title="Int">i</a><span class="delimiter">)</span>
        <span class="delimiter">}</span> <span class="keyword">else</span> <span class="delimiter">{</span>
          <a href="#iarray;IArray.interleave.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.interleave.loop.i" title="Int">i</a> <span title="(x: Int)Int">*</span> <span title="Int(2)" class="int">2</span> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span> = <a href="#iarray;IArray.interleave.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.interleave.loop.i" title="Int">i</a><span class="delimiter">)</span>
          <a href="#iarray;IArray.interleave.loop" title="(isThis: Boolean, i: Int)Unit">loop</a><span class="delimiter">(</span><span title="Boolean(true)" class="keyword">true</span>, <a href="#iarray;IArray.interleave.loop.i" title="Int">i</a> <span title="(x: Int)Int">+</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>
        <span class="delimiter">}</span>
      <span class="delimiter">}</span>
    <span class="delimiter">}</span>
    <a href="#iarray;IArray.interleave.loop" title="(isThis: Boolean, i: Int)Unit">loop</a><span class="delimiter">(</span><span title="Boolean(true)" class="keyword">true</span>, <span title="Int(0)" class="int">0</span><span class="delimiter">)</span>
    <span class="keyword">def</span> <a title="(min: Array[AnyRef], max: Array[AnyRef])Unit" id="iarray;IArray.interleave.cp">cp</a><span class="delimiter">(</span><a title="Array[AnyRef]" id="iarray;IArray.interleave.cp.min">min</a>: <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span>, <a title="Array[AnyRef]" id="iarray;IArray.interleave.cp.max">max</a>: <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Unit">Unit</span> = <span class="delimiter">{</span>
      <span title="System.type">System</span>.<span title="(x$1: Any, x$2: Int, x$3: Any, x$4: Int, x$5: Int)Unit">arraycopy</span><span class="delimiter">(</span><a href="#iarray;IArray.interleave.cp.max" title="Array[AnyRef]">max</a>, <a href="#iarray;IArray.interleave.cp.min" title="Array[AnyRef]">min</a>.<span title="=&gt; Int">length</span>, <a href="#iarray;IArray.interleave.array" title="Array[AnyRef]">array</a>, <a href="#iarray;IArray.interleave.len" title="Int">len</a> <span title="(x: Int)Int">*</span> <span title="Int(2)" class="int">2</span>, <a href="#iarray;IArray.interleave.cp.max" title="Array[AnyRef]">max</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <a href="#iarray;IArray.interleave.cp.min" title="Array[AnyRef]">min</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span>
    <span class="delimiter">}</span>
    <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">&gt;</span> <a href="#iarray;IArray.interleave.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span> <span class="delimiter">{</span>
      <a href="#iarray;IArray.interleave.cp" title="(min: Array[AnyRef], max: Array[AnyRef])Unit">cp</a><span class="delimiter">(</span><a href="#iarray;IArray.interleave.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a><span class="delimiter">)</span>
    <span class="delimiter">}</span><span class="keyword">else</span> <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.interleave.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray.interleave.cp" title="(min: Array[AnyRef], max: Array[AnyRef])Unit">cp</a><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>, <a href="#iarray;IArray.interleave.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>
    <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">(</span><a href="#iarray;IArray.interleave.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.list._
   * scala&gt; IArray(List(&quot;a&quot;), List(&quot;b&quot;, &quot;c&quot;), Nil, List(&quot;d&quot;)).intercalate(List(&quot;z&quot;))
   * res0: List[String] = List(a, z, b, c, z, z, d)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(a: A)(implicit A: scalaz.Monoid[A])A" id="iarray;IArray.intercalate">intercalate</a><span class="delimiter">(</span><a title="A" id="iarray;IArray.intercalate.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Monoid[A]" id="iarray;IArray.intercalate.A">A</a>: <span title="scalaz.Monoid[A]">Monoid</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <a href="#iarray;IArray;A" title="A">A</a> =
    <span title="A" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray.intercalate.A" title="scalaz.Monoid[A]">A</a>.<span title="=&gt; A">zero</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.intercalate.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span class="keyword">var</span> <a title="A" id="iarray;IArray.intercalate.acc">acc</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.intercalate.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.intercalate.while$76" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.intercalate.acc" title="A">acc</a> = <a href="#iarray;IArray.intercalate.A" title="scalaz.Monoid[A]">A</a>.<span title="(f1: A, f2: =&gt; A)A">append</span><span class="delimiter">(</span><a href="#iarray;IArray.intercalate.A" title="scalaz.Monoid[A]">A</a>.<span title="(f1: A, f2: =&gt; A)A">append</span><span class="delimiter">(</span><a href="#iarray;IArray.intercalate.acc" title="A">acc</a>, <a href="#iarray;IArray.intercalate.a" title="A">a</a><span class="delimiter">)</span>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.intercalate.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.intercalate.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.intercalate.acc" title="A">acc</a>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.list._
   * scala&gt; IArray(List(&quot;a&quot;), List(&quot;b&quot;, &quot;c&quot;), Nil, List(&quot;d&quot;)).intercalate1Opt(List(&quot;z&quot;))
   * res0: Option[List[String]] = Some(List(a, z, b, c, z, z, d))
   * scala&gt; IArray.empty[List[Int]].intercalate1Opt(List(7))
   * res1: Option[List[Int]] = None
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(a: A)(implicit A: scalaz.Semigroup[A])Option[A]" id="iarray;IArray.intercalate1Opt">intercalate1Opt</a><span class="delimiter">(</span><a title="A" id="iarray;IArray.intercalate1Opt.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Semigroup[A]" id="iarray;IArray.intercalate1Opt.A">A</a>: <span title="scalaz.Semigroup[A]">Semigroup</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Option[A]">Option</span><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="Option[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <span title="None.type">None</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.intercalate1Opt.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span class="keyword">var</span> <a title="A" id="iarray;IArray.intercalate1Opt.acc">acc</a> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.intercalate1Opt.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.intercalate1Opt.while$77" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.intercalate1Opt.acc" title="A">acc</a> = <a href="#iarray;IArray.intercalate1Opt.A" title="scalaz.Semigroup[A]">A</a>.<span title="(f1: A, f2: =&gt; A)A">append</span><span class="delimiter">(</span><a href="#iarray;IArray.intercalate1Opt.A" title="scalaz.Semigroup[A]">A</a>.<span title="(f1: A, f2: =&gt; A)A">append</span><span class="delimiter">(</span><a href="#iarray;IArray.intercalate1Opt.acc" title="A">acc</a>, <a href="#iarray;IArray.intercalate1Opt.a" title="A">a</a><span class="delimiter">)</span>, <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.intercalate1Opt.i" title="Int">i</a><span class="delimiter">)</span>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="A" class="delimiter">[</span><a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">]</span><span class="delimiter">)</span>
        <a href="#iarray;IArray.intercalate1Opt.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="(x: A)Some[A]">Some</span><span class="delimiter">(</span><a href="#iarray;IArray.intercalate1Opt.acc" title="A">acc</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3, 4).intersperse(0)
   * res0: IArray[Int] = IArray(1, 0, 2, 0, 3, 0, 4)
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(a: A)iarray.IArray[A]" id="iarray;IArray.intersperse">intersperse</a><span class="delimiter">(</span><a title="A" id="iarray;IArray.intersperse.a">a</a>: <a href="#iarray;IArray;A" title="A">A</a><span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span> =
    <span title="iarray.IArray[A]" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.isEmpty" title="=&gt; Boolean">isEmpty</a><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="IArrayFunctions.scala.html#iarray;IArrayFunctions.empty" title="iarray.IArray[A]">empty</a>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <span class="keyword">val</span> <a title="Array[AnyRef]" id="iarray;IArray.intersperse.array">array</a> = <span title="Array[AnyRef]" class="keyword">new</span> <span title="Array[AnyRef]">Array</span><span class="delimiter">[</span>AnyRef<span class="delimiter">]</span><span class="delimiter">(</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">*</span> <span title="Int(2)" class="int">2</span><span class="delimiter">)</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span><span class="delimiter">)</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.intersperse.i">i</a> = <span title="Int(0)" class="int">0</span>
      java.util.<span title="java.util.Arrays.type">Arrays</span>.<span title="(x$1: Array[Object], x$2: Any)Unit">fill</span><span class="delimiter">(</span><a href="#iarray;IArray.intersperse.array" title="Array[AnyRef]">array</a>, <a href="#iarray;IArray.intersperse.a" title="A">a</a><span class="delimiter">)</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.intersperse.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.intersperse.while$78" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.intersperse.array" title="(i: Int, x: AnyRef)Unit">array</a><span class="delimiter">(</span><a href="#iarray;IArray.intersperse.i" title="Int">i</a> <span title="(x: Int)Int">*</span> <span title="Int(2)" class="int">2</span><span class="delimiter">)</span> = <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.intersperse.i" title="Int">i</a><span class="delimiter">)</span>
        <a href="#iarray;IArray.intersperse.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="iarray.IArray[A]" class="keyword">new</span> <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">(</span><a href="#iarray;IArray.intersperse.array" title="Array[AnyRef]">array</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).toString
   * res0: String = IArray(1, 2, 3)
   * }}}
   */</span>
  <span class="keyword">override</span> <span class="keyword">def</span> <a title="()String" id="iarray;IArray.toString">toString</a>: <span title="String">String</span> =
    <a href="#iarray;IArray.mkString(581ef61a02)" title="(start: String, sep: String, end: String)String">mkString</a><span class="delimiter">(</span><span title="String(&quot;IArray(&quot;)" class="string">&quot;IArray(&quot;</span>,<span title="String(&quot;, &quot;)" class="string">&quot;, &quot;</span>,<span title="String(&quot;)&quot;)" class="string">&quot;)&quot;</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;).mkString(&quot;_&quot;)
   * res0: String = a_b_c
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(sep: String)String" id="iarray;IArray.mkString(f5d728d244)">mkString</a><span class="delimiter">(</span><a title="String" id="iarray;IArray.mkString$default$1">sep</a>: <span title="String">String</span> = <span title="String(&quot;&quot;)" class="string">&quot;&quot;</span><span class="delimiter">)</span>: <span title="String">String</span> =
    <a href="#iarray;IArray.mkString(581ef61a02)" title="(start: String, sep: String, end: String)String">mkString</a><span class="delimiter">(</span><span title="String(&quot;&quot;)" class="string">&quot;&quot;</span>, <a href="#iarray;IArray.mkString$default$1" title="String">sep</a>, <span title="String(&quot;&quot;)" class="string">&quot;&quot;</span><span class="delimiter">)</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(1, 2, 3).mkString(&quot;[&quot;, &quot;,&quot;, &quot;]&quot;)
   * res0: String = [1,2,3]
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(start: String, sep: String, end: String)String" id="iarray;IArray.mkString(581ef61a02)">mkString</a><span class="delimiter">(</span><a title="String" id="iarray;IArray.mkString(581ef61a02).start">start</a>: <span title="String">String</span>, <a title="String" id="iarray;IArray.mkString(581ef61a02).sep">sep</a>: <span title="String">String</span>, <a title="String" id="iarray;IArray.mkString(581ef61a02).end">end</a>: <span title="String">String</span><span class="delimiter">)</span>: <span title="String">String</span> =
    <a href="#iarray;IArray.addString" title="(b: StringBuilder, start: String, sep: String, end: String)StringBuilder">addString</a><span class="delimiter">(</span><span title="()StringBuilder" class="keyword">new</span> <span title="StringBuilder">StringBuilder</span><span class="delimiter">(</span><span class="delimiter">)</span>, <a href="#iarray;IArray.mkString(581ef61a02).start" title="String">start</a>, <a href="#iarray;IArray.mkString(581ef61a02).sep" title="String">sep</a>, <a href="#iarray;IArray.mkString(581ef61a02).end" title="String">end</a><span class="delimiter">)</span>.<span title="()String">toString</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(&quot;x&quot;, &quot;y&quot;, &quot;z&quot;).addString(new StringBuilder(&quot;aaa&quot;), &quot;c&quot;, &quot;d&quot;, &quot;e&quot;).toString
   * res0: String = aaacxdydze
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(b: StringBuilder, start: String, sep: String, end: String)StringBuilder" id="iarray;IArray.addString">addString</a><span class="delimiter">(</span><a title="StringBuilder" id="iarray;IArray.addString.b">b</a>: <span title="StringBuilder">StringBuilder</span>, <a title="String" id="iarray;IArray.addString.start">start</a>: <span title="String">String</span>, <a title="String" id="iarray;IArray.addString.sep">sep</a>: <span title="String">String</span>, <a title="String" id="iarray;IArray.addString.end">end</a>: <span title="String">String</span><span class="delimiter">)</span>: <span title="StringBuilder">StringBuilder</span> = <span class="delimiter">{</span>
    <a href="#iarray;IArray.addString.b" title="StringBuilder">b</a> <span title="(s: String)StringBuilder">append</span> <a href="#iarray;IArray.addString.start" title="String">start</a>

    <span title="StringBuilder" class="keyword">if</span><span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <span title="Int(0)" class="int">0</span><span class="delimiter">)</span><span class="delimiter">{</span>
      <a href="#iarray;IArray.addString.b" title="StringBuilder">b</a>.<span title="(s: String)StringBuilder">append</span><span class="delimiter">(</span><a href="#iarray;IArray.addString.end" title="String">end</a><span class="delimiter">)</span>
    <span class="delimiter">}</span><span class="keyword">else</span><span class="delimiter">{</span>
      <a href="#iarray;IArray.addString.b" title="StringBuilder">b</a> <span title="(x: Any)StringBuilder">append</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><span title="Int(0)" class="int">0</span><span class="delimiter">)</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.addString.i">i</a> = <span title="Int(1)" class="int">1</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.addString.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.addString.while$79" title="()Unit" class="delimiter">{</a>
        <a href="#iarray;IArray.addString.b" title="StringBuilder">b</a> <span title="(s: String)StringBuilder">append</span> <a href="#iarray;IArray.addString.sep" title="String">sep</a>
        <a href="#iarray;IArray.addString.b" title="StringBuilder">b</a> <span title="(x: Any)StringBuilder">append</span> <a href="#iarray;IArray.self" title="(i: Int)AnyRef">self</a><span class="delimiter">(</span><a href="#iarray;IArray.addString.i" title="Int">i</a><span class="delimiter">)</span>
        <a href="#iarray;IArray.addString.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.addString.b" title="StringBuilder">b</a>.<span title="(s: String)StringBuilder">append</span><span class="delimiter">(</span><a href="#iarray;IArray.addString.end" title="String">end</a><span class="delimiter">)</span>
    <span class="delimiter">}</span>
  <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; import scalaz.std.anyVal._
   * scala&gt; IArray(1, 2) === IArray(1, 2)
   * res0: Boolean = true
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="(that: iarray.IArray[A])(implicit A: scalaz.Equal[A])Boolean" id="iarray;IArray.===">===</a><span class="delimiter">(</span><a title="iarray.IArray[A]" id="iarray;IArray.===.that">that</a>: <a href="#iarray;IArray" title="iarray.IArray[A]">IArray</a><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="scalaz.Equal[A]" id="iarray;IArray.===.A">A</a>: <span title="scalaz.Equal[A]">Equal</span><span class="delimiter">[</span>A<span class="delimiter">]</span><span class="delimiter">)</span>: <span title="Boolean">Boolean</span> =
    <span class="delimiter">(</span><a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Boolean">==</span> <a href="#iarray;IArray.===.that" title="iarray.IArray[A]">that</a>.<a href="#iarray;IArray.length" title="=&gt; Int">length</a><span class="delimiter">)</span> <span title="(x: Boolean)Boolean">&amp;&amp;</span> <span class="delimiter">{</span>
      <span class="keyword">var</span> <a title="Int" id="iarray;IArray.===.i">i</a> = <span title="Int(0)" class="int">0</span>
      <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.===.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.===.while$80" title="()Unit" class="delimiter">{</a>
        <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><span title="=&gt; Boolean">!</span> <a href="#iarray;IArray.===.A" title="scalaz.Equal[A]">A</a>.<span title="(a1: A, a2: A)Boolean">equal</span><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A">that</a><span class="delimiter">(</span><a href="#iarray;IArray.===.i" title="Int">i</a><span class="delimiter">)</span>, <a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.===.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
          <span title="Nothing" class="keyword">return</span> <span title="Boolean(false)" class="keyword">false</span>
        <span class="delimiter">}</span>
        <a href="#iarray;IArray.===.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
      <span class="delimiter">}</span>
      <span title="Boolean(true)" class="keyword">true</span>
    <span class="delimiter">}</span>

  <span class="comment">/**
   * @example{{{
   * scala&gt; IArray(List(1)).widen[Seq[Int]]
   * res0: IArray[Seq[Int]] = IArray(List(1))
   * }}}
   */</span>
  <span class="keyword">def</span> <a title="[B](implicit ev: &lt;:&lt;[A,B])iarray.IArray[B]" id="iarray;IArray.widen">widen</a><span class="delimiter">[</span><a title="" id="iarray;IArray.widen;B">B</a><span class="delimiter">]</span><span class="delimiter">(</span><span class="keyword">implicit</span> <a title="&lt;:&lt;[A,B]" id="iarray;IArray.widen.ev">ev</a>: A <span title="&lt;:&lt;[A,B]">&lt;:&lt;</span> B<span class="delimiter">)</span>: <a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span> =
    <a href="#iarray;IArray" title="IArray.this.type" class="keyword">this</a>.<span title="[T0]=&gt; T0">asInstanceOf</span><span title="iarray.IArray[B]" class="delimiter">[</span><a href="#iarray;IArray" title="iarray.IArray[B]">IArray</a><span class="delimiter">[</span>B<span class="delimiter">]</span><span class="delimiter">]</span>

  @inline <span class="keyword">private</span> <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)Int" id="iarray;IArray.indexNot">indexNot</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.indexNot.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="Int">Int</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.indexNot.i">i</a> = <span title="Int(0)" class="int">0</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><a href="#iarray;IArray.indexNot.i" title="Int">i</a> <span title="(x: Int)Boolean">&lt;</span> <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span><span class="delimiter">)</span><a href="#iarray;IArray.indexNot.while$81" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><span title="=&gt; Boolean">!</span> <a href="#iarray;IArray.indexNot.f" title="(v1: A)Boolean">f</a><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.indexNot.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <a href="#iarray;IArray.indexNot.i" title="Int">i</a>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.indexNot.i" title="Int">i</a> <span title="(x: Int)Int">+=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    -<span title="Int(-1)" class="int">1</span>
  <span class="delimiter">}</span>

  @inline <span class="keyword">private</span> <span class="keyword">def</span> <a title="(f: A =&gt; Boolean)Int" id="iarray;IArray.lastIndex">lastIndex</a><span class="delimiter">(</span><a title="A =&gt; Boolean" id="iarray;IArray.lastIndex.f">f</a>: A =&gt; Boolean<span class="delimiter">)</span>: <span title="Int">Int</span> = <span class="delimiter">{</span>
    <span class="keyword">var</span> <a title="Int" id="iarray;IArray.lastIndex.i">i</a> = <a href="#iarray;IArray.self" title="=&gt; Array[AnyRef]">self</a>.<span title="=&gt; Int">length</span> <span title="(x: Int)Int">-</span> <span title="Int(1)" class="int">1</span>
    <span title="Unit" class="keyword">while</span><span class="delimiter">(</span><span title="Int(0)" class="int">0</span> <span title="(x: Int)Boolean">&lt;=</span> <a href="#iarray;IArray.lastIndex.i" title="Int">i</a><span class="delimiter">)</span><a href="#iarray;IArray.lastIndex.while$82" title="()Unit" class="delimiter">{</a>
      <span title="Unit" class="keyword">if</span><span class="delimiter">(</span><span title="=&gt; Boolean">!</span><a href="#iarray;IArray.lastIndex.f" title="(v1: A)Boolean">f</a><span class="delimiter">(</span><a href="#iarray;IArray.apply" title="(i: Int)A" class="keyword">this</a><span class="delimiter">(</span><a href="#iarray;IArray.lastIndex.i" title="Int">i</a><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">)</span><span class="delimiter">{</span>
        <span title="Nothing" class="keyword">return</span> <a href="#iarray;IArray.lastIndex.i" title="Int">i</a>
      <span class="delimiter">}</span>
      <a href="#iarray;IArray.lastIndex.i" title="Int">i</a> <span title="(x: Int)Int">-=</span> <span title="Int(1)" class="int">1</span>
    <span class="delimiter">}</span>
    -<span title="Int(-1)" class="int">1</span>
  <span class="delimiter">}</span>

<span class="delimiter">}</span>


        </pre>
    </body>
</html>
New to GrepCode? Check out our FAQ X