├── .gitignore
├── .github
├── FUNDING.yml
└── workflows
│ ├── clean.yml
│ └── ci.yml
├── project
├── build.properties
└── plugins.sbt
├── docs
├── img
│ └── favicon.png
├── index.md
└── FeatureGrid.md
├── .scalafmt.conf
├── narr
├── js
│ └── src
│ │ └── main
│ │ └── scala
│ │ └── narr
│ │ └── native
│ │ ├── SortableNArr.scala
│ │ ├── NArr.scala
│ │ ├── NativeArrayBuilder.scala
│ │ └── package.scala
├── jvm-native
│ └── src
│ │ └── main
│ │ └── scala
│ │ └── narr
│ │ └── native
│ │ ├── NativeArrayBuilder.scala
│ │ └── package.scala
└── shared
│ └── src
│ └── main
│ └── scala
│ └── narr
│ ├── package.scala
│ └── NArrayBuilder.scala
├── tests
└── shared
│ └── src
│ └── test
│ └── scala
│ ├── MapInPlaceTest.scala
│ ├── FlattenTest.scala
│ ├── CollectTest.scala
│ ├── Util.scala
│ ├── FlatMapTest.scala
│ ├── FilterTest.scala
│ ├── CopyTest.scala
│ ├── GroupTest.scala
│ ├── UnzipTest.scala
│ ├── PartitionTest.scala
│ ├── SortTest.scala
│ ├── BuilderTest.scala
│ ├── InstantiationTest.scala
│ ├── FoldAndScanTest.scala
│ └── NArrayOpsTest.scala
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .metals
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: dragonfly-ai
--------------------------------------------------------------------------------
/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=1.11.7
--------------------------------------------------------------------------------
/docs/img/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dragonfly-ai/narr/HEAD/docs/img/favicon.png
--------------------------------------------------------------------------------
/.scalafmt.conf:
--------------------------------------------------------------------------------
1 | version = "3.10.2"
2 | runner.dialect = Scala213Source3
3 | project.includePaths = [] # disables formatting
4 |
--------------------------------------------------------------------------------
/project/plugins.sbt:
--------------------------------------------------------------------------------
1 | val crossVer = "1.3.2"
2 | val scalaJSVersion = "1.20.1"
3 | val scalaNativeVersion = "0.5.9"
4 | val sbtTypelevelVersion = "0.8.4"
5 |
6 | addDependencyTreePlugin
7 |
8 | // Scala Native support
9 | addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % crossVer)
10 | addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
11 |
12 | // Scala.js support
13 | addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
14 | addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % crossVer)
15 |
16 | // continuous integration
17 | addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtTypelevelVersion)
18 |
19 | // Make me a website!
20 | addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % sbtTypelevelVersion)
21 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # NArr
2 | pronounced: (ˈnär, as in gnarly) stands for: Native Array
3 |
4 | NArr gives you native Array performance on all platforms: JVM, JS, and Native without wrappers, conversions, or boilerplate. You also get Scala `ArrayOps` semantics on JavaScript `TypedArray`s.
5 |
6 |
Please visit the project homepage to learn more.
7 |
8 |
9 | Click here to compare coverage of ArrayOps between Scala, Scala.js, and NArr.
10 |
| Declaration | 17 |Meaning in JavaScript | 18 |Meaning in JVM and Native | 19 |
| 22 | 23 | ```scala 24 | NArray[Byte] 25 | NArray[Short] 26 | NArray[Int] 27 | NArray[Float] 28 | NArray[Double] 29 | NArray[Long] 30 | NArray[String] 31 | NArray[AnyRef] 32 | NArray[NArray[Int]] 33 | NArray[NArray[AnyRef]] 34 | ``` 35 | | 36 |37 | 38 | ```scala 39 | Int8Array 40 | Int16Array 41 | Int32Array 42 | Float32Array 43 | Float64Array 44 | js.Array[Long] 45 | js.Array[String] 46 | js.Array[AnyRef] 47 | js.Array[Int32Array] 48 | js.Array[js.Array[AnyRef]] 49 | ``` 50 | | 51 |52 | 53 | ```scala 54 | scala.Array[Byte] 55 | scala.Array[Short] 56 | scala.Array[Int] 57 | scala.Array[Float] 58 | scala.Array[Double] 59 | scala.Array[Long] 60 | scala.Array[String] 61 | scala.Array[AnyRef] 62 | scala.Array[Array[Int]] 63 | scala.Array[Array[AnyRef]] 64 | ``` 65 | | 66 |
| Array Dependency | 305 |Convenience | 306 |Performance Increase | 307 |Notes | 308 |||
| 311 | | JS | 312 |JVM | 313 |Native | 314 |315 | | |
| No Arrays | 318 |☆☆☆ | 319 |☆☆☆ | 320 |☆☆☆ | 321 |☆☆☆ | 322 |NArr offers no utility for projects that do not use Arrays. | 323 |
| js.Array[T <: AnyRef] | 326 |☆☆☆ | 327 |☆☆☆ | 328 |☆☆☆ | 329 |☆☆☆ | 330 |js.Array[T] will suffice | 331 |
| Array[T] | 334 |☆☆☆ | 335 |★☆☆ | 336 |☆☆☆ | 337 |☆☆☆ | 338 |Array[T] might not perform as optimally as the native js.Array[T] in JavaScript environments. | 339 |
| js.Array[T] and Array[T] | 342 |★★★ | 343 |★★★ | 344 |☆☆☆ | 345 |☆☆☆ | 346 |Seamless optimized interop with native code on both platforms without any conversions or wrappers. | 347 |
| Int8Array or Array[Byte] | 350 |★★★ | 351 |★★★ | 352 |☆☆☆ | 353 |☆☆☆ | 354 |Seamless optimized interop with native code on both platforms without any conversions or wrappers. | 355 |
| Int16Array or Array[Short] | 358 |★★★ | 359 |★★★ | 360 |☆☆☆ | 361 |☆☆☆ | 362 |Seamless optimized interop with native code on both platforms without any conversions or wrappers. | 363 |
| Int32Array or Array[Int] | 366 |★★★ | 367 |★★★ | 368 |☆☆☆ | 369 |☆☆☆ | 370 |Seamless optimized interop with native code on both platforms without any conversions or wrappers. | 371 |
| Float32Array or Array[Float] | 374 |★★★ | 375 |★★★ | 376 |☆☆☆ | 377 |☆☆☆ | 378 |Seamless optimized interop with native code on both platforms without any conversions or wrappers. | 379 |
| Float64Array or Array[Double] | 382 |★★★ | 383 |★★★ | 384 |☆☆☆ | 385 |☆☆☆ | 386 |Seamless optimized interop with native code on both platforms without any conversions or wrappers. | 387 |
| Other JavaScript `TypedArray`s | 390 |☆☆☆ | 391 |☆☆☆ | 392 |☆☆☆ | 393 |☆☆☆ | 394 |Good JVM analogues do not exist. NArr can't help, but what can? | 395 |
| Method Signature | 5 |
6 |
7 | `ArrayOps`
8 | (JVM / Native) 9 | |
10 |
11 |
12 | `js.ArrayOps`
13 | (js.Array) |
14 |
15 |
16 | `narr.Extensions`
17 | (NArr) |
18 |
| 21 | 22 | ```scala 23 | def width: Int 24 | ``` 25 | | 26 |✓ | 27 |✓ | 28 |✓ | 29 |
| 32 | 33 | ```scala 34 | def knownSize: Int 35 | ``` 36 | | 37 |✓ | 38 |✓ | 39 |✓ | 40 |
| 43 | 44 | ```scala 45 | def isEmpty: Boolean 46 | ``` 47 | | 48 |✓ | 49 |✓ | 50 |✓ | 51 |
| 54 | 55 | ```scala 56 | def nonEmpty: Boolean 57 | ``` 58 | | 59 |✓ | 60 |✓ | 61 |✓ | 62 |
| 65 | 66 | ```scala 67 | def head: T 68 | ``` 69 | | 70 |✓ | 71 |✓ | 72 |✓ | 73 |
| 76 | 77 | ```scala 78 | def last: T 79 | ``` 80 | | 81 |✓ | 82 |✓ | 83 |✓ | 84 |
| 87 | 88 | ```scala 89 | def headOption: Option[T] 90 | ``` 91 | | 92 |✓ | 93 |✓ | 94 |✓ | 95 |
| 98 | 99 | ```scala 100 | def lastOption: Option[T] 101 | ``` 102 | | 103 |✓ | 104 |✓ | 105 |✓ | 106 |
| 109 | 110 | ```scala 111 | def sizeCompare(otherSize: Int): Int 112 | ``` 113 | | 114 |✓ | 115 |✓ | 116 |✓ | 117 |
| 120 | 121 | ```scala 122 | def lengthCompare(len: Int): Int 123 | ``` 124 | | 125 |✓ | 126 |✓ | 127 |✓ | 128 |
| 131 | 132 | ```scala 133 | def sizeIs: Int 134 | ``` 135 | | 136 |✓ | 137 |✓ | 138 |✓ | 139 |
| 142 | 143 | ```scala 144 | def lengthIs: Int 145 | ``` 146 | | 147 |✓ | 148 |✓ | 149 |✓ | 150 |
| 153 | 154 | ```scala 155 | def slice(from: Int, until: Int): Array[T] 156 | ``` 157 | | 158 |✓ | 159 |✓ | 160 |✓ | 161 |
| 164 | 165 | ```scala 166 | def tail: Array[T] 167 | ``` 168 | | 169 |✓ | 170 |✓ | 171 |✓ | 172 |
| 175 | 176 | ```scala 177 | def init: Array[T] 178 | ``` 179 | | 180 |✓ | 181 |✓ | 182 |✓ | 183 |
| 186 | 187 | ```scala 188 | def tails: Iterator[Array[T]] 189 | ``` 190 | | 191 |✓ | 192 |✓ | 193 |✓ | 194 |
| 197 | 198 | ```scala 199 | def inits: Iterator[Array[T]] 200 | ``` 201 | | 202 |✓ | 203 |✓ | 204 |✓ | 205 |
| 208 | 209 | ```scala 210 | def take(n: Int): Array[T] 211 | ``` 212 | | 213 |✓ | 214 |✓ | 215 |✓ | 216 |
| 219 | 220 | ```scala 221 | def drop(n: Int): Array[T] 222 | ``` 223 | | 224 |✓ | 225 |✓ | 226 |✓ | 227 |
| 230 | 231 | ```scala 232 | def takeRight(n: Int): Array[T] 233 | ``` 234 | | 235 |✓ | 236 |✓ | 237 |✓ | 238 |
| 241 | 242 | ```scala 243 | def dropRight(n: Int): Array[T] 244 | ``` 245 | | 246 |✓ | 247 |✓ | 248 |✓ | 249 |
| 252 | 253 | ```scala 254 | def takeWhile(p: T => Boolean): Array[T] 255 | ``` 256 | | 257 |✓ | 258 |✓ | 259 |✓ | 260 |
| 263 | 264 | ```scala 265 | def dropWhile(p: T => Boolean): Array[T] 266 | ``` 267 | | 268 |✓ | 269 |✓ | 270 |✓ | 271 |
| 274 | 275 | ```scala 276 | def iterator: Iterator[T] 277 | ``` 278 | | 279 |✓ | 280 |✓ | 281 |✓ | 282 |
| 285 | 286 | ```scala 287 | def stepper[S <: Stepper[_]]( 288 | implicit shape: StepperShape[T, S] 289 | ): S with EfficientSplit 290 | ``` 291 | | 292 |✓ | 293 |❌ | 294 |❌ | 295 |
| 298 | 299 | ```scala 300 | def grouped(width: Int): Iterator[Array[T]] 301 | ``` 302 | | 303 |✓ | 304 |✓ | 305 |✓ | 306 |
| 309 | 310 | ```scala 311 | def span(p: T => Boolean): (Array[T], Array[T]) 312 | ``` 313 | | 314 |✓ | 315 |✓ | 316 |✓ | 317 |
| 320 | 321 | ```scala 322 | def splitAt(n: Int): (Array[T], Array[T]) 323 | ``` 324 | | 325 |✓ | 326 |✓ | 327 |✓ | 328 |
| 331 | 332 | ```scala 333 | def partition(p: T => Boolean): (Array[T], Array[T]) 334 | ``` 335 | | 336 |✓ | 337 |✓ | 338 |✓ | 339 |
| 342 | 343 | ```scala 344 | def partitionMap[A1: ClassTag, A2: ClassTag]( 345 | f: T => Either[A1, A2] 346 | ): (Array[A1], Array[A2]) 347 | ``` 348 | | 349 |✓ | 350 |✓ | 351 |✓ | 352 |
| 355 | 356 | ```scala 357 | def reverse: Array[T] 358 | ``` 359 | | 360 |✓ | 361 |✓ | 362 |✓ | 363 |
| 366 | | |||
| 368 | 369 | ```scala 370 | def reverseIterator: Iterator[T] 371 | ``` 372 | | 373 |✓ | 374 |✓ | 375 |✓ | 376 |
| 379 | 380 | ```scala 381 | def filter(p: T => Boolean): Array[T] 382 | ``` 383 | | 384 |✓ | 385 |✓ | 386 |✓ | 387 |
| 390 | 391 | ```scala 392 | def filterNot(p: T => Boolean): Array[T] 393 | ``` 394 | | 395 |✓ | 396 |✓ | 397 |✓ | 398 |
| 401 | 402 | ```scala 403 | def sorted[B >: T](implicit ord: Ordering[B]): Array[T] 404 | ``` 405 | | 406 |✓ | 407 |✓ | 408 |✓ | 409 |
| 412 | 413 | ```scala 414 | def sortWith(lt: (T, T) => Boolean): Array[T] 415 | ``` 416 | | 417 |✓ | 418 |✓ | 419 |✓ | 420 |
| 423 | 424 | ```scala 425 | def sortBy[B](f: T => B)(implicit ord: Ordering[B]): Array[T] 426 | ``` 427 | | 428 |✓ | 429 |✓ | 430 |✓ | 431 |
| 434 | 435 | ```scala 436 | def withFilter(p: T => Boolean): ArrayOps.WithFilter[T] 437 | ``` 438 | | 439 |✓ | 440 |✓ | 441 |❌ | 442 |
| 445 | 446 | ```scala 447 | def indexOf(elem: T, from: Int = 0): Int 448 | ``` 449 | | 450 |✓ | 451 |✓ | 452 |✓ | 453 |
| 456 | 457 | ```scala 458 | def indexWhere(p: T => Boolean, from: Int = 0): Int 459 | ``` 460 | | 461 |✓ | 462 |✓ | 463 |✓ | 464 |
| 467 | 468 | ```scala 469 | def lastIndexOf(elem: T, end: Int = xs.length - 1): Int 470 | ``` 471 | | 472 |✓ | 473 |✓ | 474 |✓ | 475 |
| 478 | 479 | ```scala 480 | def lastIndexWhere(p: T => Boolean, end: Int = xs.length - 1): Int 481 | ``` 482 | | 483 |✓ | 484 |✓ | 485 |✓ | 486 |
| 489 | 490 | ```scala 491 | def find(p: T => Boolean): Option[T] 492 | ``` 493 | | 494 |✓ | 495 |✓ | 496 |✓ | 497 |
| 500 | 501 | ```scala 502 | def exists(p: T => Boolean): Boolean 503 | ``` 504 | | 505 |✓ | 506 |✓ | 507 |✓ | 508 |
| 511 | 512 | ```scala 513 | def forall(p: T => Boolean): Boolean 514 | ``` 515 | | 516 |✓ | 517 |✓ | 518 |✓ | 519 |
| 522 | 523 | ```scala 524 | def foldLeft[B](z: B)(op: (B, T) => B): B 525 | ``` 526 | | 527 |✓ | 528 |✓ | 529 |✓ | 530 |
| 533 | 534 | ```scala 535 | def scanLeft[ B : ClassTag ](z: B)(op: (B, T) => B): Array[B] 536 | ``` 537 | | 538 |✓ | 539 |✓ | 540 |✓ | 541 |
| 544 | 545 | ```scala 546 | def scan[B >: T : ClassTag](z: B)(op: (B, B) => B): Array[B] 547 | ``` 548 | | 549 |✓ | 550 |✓ | 551 |✓ | 552 |
| 555 | 556 | ```scala 557 | def scanRight[ B : ClassTag ](z: B)(op: (T, B) => B): Array[B] 558 | ``` 559 | | 560 |✓ | 561 |✓ | 562 |✓ | 563 |
| 566 | 567 | ```scala 568 | def foldRight[B](z: B)(op: (T, B) => B): B 569 | ``` 570 | | 571 |✓ | 572 |✓ | 573 |✓ | 574 |
| 577 | 578 | ```scala 579 | def fold[A1 >: T](z: A1)(op: (A1, A1) => A1): A1 580 | ``` 581 | | 582 |✓ | 583 |✓ | 584 |✓ | 585 |
| 588 | 589 | ```scala 590 | def map[B](f: T => B)(implicit ct: ClassTag[B]): Array[B] 591 | ``` 592 | | 593 |✓ | 594 |✓ | 595 |✓ | 596 |
| 599 | 600 | ```scala 601 | def mapInPlace(f: T => T): Array[T] 602 | ``` 603 | | 604 |✓ | 605 |✓ | 606 |✓ | 607 |
| 610 | 611 | ```scala 612 | def flatMap[B : ClassTag]( 613 | f: T => IterableOnce[B] 614 | ): Array[B] 615 | ``` 616 | | 617 |✓ | 618 |✓ | 619 |✓ | 620 |
| 623 | 624 | ```scala 625 | def flatMap[BS, B](f: T => BS)( 626 | implicit asIterable: BS => Iterable[B], m: ClassTag[B] 627 | ): Array[B] 628 | ``` 629 | | 630 |✓ | 631 |✓ | 632 |✓ | 633 |
| 636 | 637 | ```scala 638 | def flatten[B]( 639 | implicit asIterable: T => IterableOnce[B], m: ClassTag[B] 640 | ): Array[B] 641 | ``` 642 | | 643 |✓ | 644 |✓ | 645 |✓ | 646 |
| 649 | 650 | ```scala 651 | def collect[B: ClassTag](pf: PartialFunction[T, B]): Array[B] 652 | ``` 653 | | 654 |✓ | 655 |✓ | 656 |✓ | 657 |
| 660 | 661 | ```scala 662 | def collectFirst[B](pf: PartialFunction[T, B]): Option[B] 663 | ``` 664 | | 665 |✓ | 666 |✓ | 667 |✓ | 668 |
| 671 | 672 | ```scala 673 | def zip[B](that: IterableOnce[B]): Array[(T, B)] 674 | ``` 675 | | 676 |✓ | 677 |✓ | 678 |✓ | 679 |
| 682 | 683 | ```scala 684 | def lazyZip[B](that: Iterable[B]): LazyZip2[T, B, Array[T]] 685 | ``` 686 | | 687 |✓ | 688 |❌ | 689 |❌ | 690 |
| 693 | 694 | ```scala 695 | def zipAll[A1 >: T, B]( 696 | that: Iterable[B], thisElem: A1, thatElem: B 697 | ): Array[(A1, B)] 698 | ``` 699 | | 700 |✓ | 701 |✓ | 702 |✓ | 703 |
| 706 | 707 | ```scala 708 | def zipWithIndex: Array[(T, Int)] 709 | ``` 710 | | 711 |✓ | 712 |✓ | 713 |✓ | 714 |
| 717 | 718 | ```scala 719 | def appended[B >: T : ClassTag](x: B): Array[B] 720 | ``` 721 | | 722 |✓ | 723 |✓ | 724 |✓ | 725 |
| 728 | 729 | ```scala 730 | def :+ [B >: T : ClassTag](x: B): Array[B] 731 | ``` 732 | | 733 |✓ | 734 |✓ | 735 |✓ | 736 |
| 739 | 740 | ```scala 741 | def prepended[B >: T : ClassTag](x: B): Array[B] 742 | ``` 743 | | 744 |✓ | 745 |✓ | 746 |✓ | 747 |
| 750 | 751 | ```scala 752 | def +: [B >: T : ClassTag](x: B): Array[B] 753 | ``` 754 | | 755 |✓ | 756 |✓ | 757 |✓ | 758 |
| 761 | 762 | ```scala 763 | def prependedAll[B >: T : ClassTag](prefix: IterableOnce[B]): Array[B] 764 | ``` 765 | | 766 |✓ | 767 |✓ | 768 |✓ | 769 |
| 772 | 773 | ```scala 774 | def prependedAll[B >: T : ClassTag](prefix: Array[_ <: B]): Array[B] 775 | ``` 776 | | 777 |✓ | 778 |✓ | 779 |✓ | 780 |
| 783 | 784 | ```scala 785 | def ++: [B >: T : ClassTag](prefix: IterableOnce[B]): Array[B] 786 | ``` 787 | | 788 |✓ | 789 |✓ | 790 |✓ | 791 |
| 794 | 795 | ```scala 796 | def ++: [B >: T : ClassTag](prefix: Array[_ <: B]): Array[B] 797 | 798 | ``` 799 | | 800 |✓ | 801 |✓ | 802 |✓ | 803 |
| 806 | 807 | ```scala 808 | def appendedAll[B >: T : ClassTag](suffix: IterableOnce[B]): Array[B] 809 | ``` 810 | | 811 |✓ | 812 |✓ | 813 |✓ | 814 |
| 817 | 818 | ```scala 819 | def appendedAll[B >: T : ClassTag](suffix: Array[_ <: B]): Array[B] 820 | ``` 821 | | 822 |✓ | 823 |✓ | 824 |✓ | 825 |
| 828 | 829 | ```scala 830 | def :++ [B >: T : ClassTag](suffix: IterableOnce[B]): Array[B] 831 | ``` 832 | | 833 |✓ | 834 |✓ | 835 |✓ | 836 |
| 839 | 840 | ```scala 841 | def :++ [B >: T : ClassTag](suffix: Array[_ <: B]): Array[B] 842 | ``` 843 | | 844 |✓ | 845 |✓ | 846 |✓ | 847 |
| 850 | 851 | ```scala 852 | def concat[B >: T : ClassTag](suffix: IterableOnce[B]): Array[B] 853 | ``` 854 | | 855 |✓ | 856 |✓ | 857 |✓ | 858 |
| 861 | 862 | ```scala 863 | def concat[B >: T : ClassTag](suffix: Array[_ <: B]): Array[B] 864 | ``` 865 | | 866 |✓ | 867 |❌ | 868 |✓ | 869 |
| 872 | 873 | ```scala 874 | def ++[B >: T : ClassTag](xs: IterableOnce[B]): Array[B] 875 | ``` 876 | | 877 |✓ | 878 |✓ | 879 |✓ | 880 |
| 883 | 884 | ```scala 885 | def ++[B >: T : ClassTag](xs: Array[_ <: B]): Array[B] 886 | ``` 887 | | 888 |✓ | 889 |✓ | 890 |✓ | 891 |
| 894 | 895 | ```scala 896 | def contains(elem: T): Boolean 897 | ``` 898 | | 899 |✓ | 900 |✓ | 901 |✓ | 902 |
| 905 | 906 | ```scala 907 | def patch[B >: T : ClassTag]( 908 | from: Int, other: IterableOnce[B], replaced: Int 909 | ): Array[B] 910 | ``` 911 | | 912 |✓ | 913 |✓ | 914 |✓ | 915 |
| 918 | 919 | ```scala 920 | def unzip[A1, A2]( 921 | implicit asPair: T => (A1, A2), ct1: ClassTag[A1], ct2: ClassTag[A2] 922 | ): (Array[A1], Array[A2]) 923 | ``` 924 | | 925 |✓ | 926 |✓ | 927 |✓ | 928 |
| 931 | 932 | ```scala 933 | def unzip3[A1, A2, A3]( 934 | implicit asTriple: T => (A1, A2, A3), 935 | ct1: ClassTag[A1], 936 | ct2: ClassTag[A2], 937 | ct3: ClassTag[A3] 938 | ): (Array[A1], Array[A2], Array[A3]) 939 | ``` 940 | | 941 |✓ | 942 |✓ | 943 |✓ | 944 |
| 947 | 948 | ```scala 949 | def transpose[B](implicit asArray: T => Array[B]): Array[Array[B]] 950 | ``` 951 | | 952 |✓ | 953 |✓ | 954 |❌ | 955 |
| 958 | 959 | ```scala 960 | def foreach[U](f: T => U): Unit 961 | ``` 962 | | 963 |✓ | 964 |✓ | 965 |✓ | 966 |
| 969 | 970 | ```scala 971 | def distinct: Array[T] 972 | ``` 973 | | 974 |✓ | 975 |✓ | 976 |✓ | 977 |
| 980 | 981 | ```scala 982 | def distinctBy[B](f: T => B): Array[T] 983 | ``` 984 | | 985 |✓ | 986 |✓ | 987 |✓ | 988 |
| 991 | 992 | ```scala 993 | def padTo[B >: T : ClassTag](len: Int, elem: B): Array[B] 994 | ``` 995 | | 996 |✓ | 997 |✓ | 998 |✓ | 999 |
| 1002 | 1003 | ```scala 1004 | def indices: Range 1005 | ``` 1006 | | 1007 |✓ | 1008 |✓ | 1009 |✓ | 1010 |
| 1013 | 1014 | ```scala 1015 | def groupBy[K](f: T => K): immutable.Map[K, Array[T]] 1016 | ``` 1017 | | 1018 |✓ | 1019 |✓ | 1020 |✓ | 1021 |
| 1024 | 1025 | ```scala 1026 | def groupMap[K, B : ClassTag]( 1027 | key: T => K 1028 | )( 1029 | f: T => B): immutable.Map[K, Array[B]] 1030 | ``` 1031 | | 1032 |✓ | 1033 |✓ | 1034 |✓ | 1035 |
| 1038 | 1039 | ```scala 1040 | def toSeq: immutable.Seq[T] 1041 | ``` 1042 | | 1043 |✓ | 1044 |✓ | 1045 |✓ | 1046 |
| 1049 | 1050 | ```scala 1051 | def toIndexedSeq: immutable.IndexedSeq[T] 1052 | ``` 1053 | | 1054 |✓ | 1055 |✓ | 1056 |✓ | 1057 |
| 1060 | 1061 | ```scala 1062 | def copyToArray[B >: T](xs: Array[B]): Int 1063 | ``` 1064 | | 1065 |✓ | 1066 |✓ | 1067 |✓ | 1068 |
| 1071 | 1072 | ```scala 1073 | def copyToArray[B >: T](xs: Array[B], start: Int): Int 1074 | ``` 1075 | | 1076 |✓ | 1077 |✓ | 1078 |✓ | 1079 |
| 1082 | 1083 | ```scala 1084 | def copyToArray[B >: T](xs: Array[B], start: Int, len: Int): Int 1085 | ``` 1086 | | 1087 |✓ | 1088 |✓ | 1089 |✓ | 1090 |
| 1093 | 1094 | ```scala 1095 | def toArray[B >: T: ClassTag]: Array[B] 1096 | ``` 1097 | | 1098 |✓ | 1099 |✓ | 1100 |✓ | 1101 |
| 1104 | 1105 | ```scala 1106 | def count(p: T => Boolean): Int 1107 | ``` 1108 | | 1109 |✓ | 1110 |✓ | 1111 |✓ | 1112 |
| 1115 | 1116 | ```scala 1117 | def startsWith[B >: T](that: Array[B]): Boolean 1118 | ``` 1119 | | 1120 |✓ | 1121 |✓ | 1122 |✓ | 1123 |
| 1126 | 1127 | ```scala 1128 | def startsWith[B >: T](that: Array[B], offset: Int): Boolean 1129 | ``` 1130 | | 1131 |✓ | 1132 |✓ | 1133 |✓ | 1134 |
| 1137 | 1138 | ```scala 1139 | def endsWith[B >: T](that: Array[B]): Boolean 1140 | ``` 1141 | | 1142 |✓ | 1143 |✓ | 1144 |✓ | 1145 |
| 1148 | 1149 | ```scala 1150 | def updated[B >: T : ClassTag](index: Int, elem: B): Array[B] 1151 | ``` 1152 | | 1153 |✓ | 1154 |✓ | 1155 |✓ | 1156 |
| 1159 | 1160 | ```scala 1161 | def view: IndexedSeqView[T] 1162 | ``` 1163 | | 1164 |✓ | 1165 |✓ | 1166 |✓ | 1167 |
| 1170 | 1171 | ```scala 1172 | def diff[B >: T](that: Seq[B]): Array[T] 1173 | ``` 1174 | | 1175 |✓ | 1176 |✓ | 1177 |✓ | 1178 |
| 1181 | 1182 | ```scala 1183 | def intersect[B >: T](that: Seq[B]): Array[T] 1184 | ``` 1185 | | 1186 |✓ | 1187 |✓ | 1188 |✓ | 1189 |
| 1192 | 1193 | ```scala 1194 | def sliding(width: Int, step: Int = 1): Iterator[Array[T]] 1195 | ``` 1196 | | 1197 |✓ | 1198 |✓ | 1199 |✓ | 1200 |
| 1203 | 1204 | ```scala 1205 | def combinations(n: Int): Iterator[Array[T]] 1206 | ``` 1207 | | 1208 |✓ | 1209 |✓ | 1210 |❌ | 1211 |
| 1214 | 1215 | ```scala 1216 | def permutations: Iterator[Array[T]] 1217 | ``` 1218 | | 1219 |✓ | 1220 |✓ | 1221 |❌ | 1222 |
| 1225 | 1226 | ```scala 1227 | def startsWith[B >: T](that: IterableOnce[B], offset: Int = 0): Boolean 1228 | ``` 1229 | | 1230 |✓ | 1231 |✓ | 1232 |❌* | 1233 |
| 1236 | 1237 | ```scala 1238 | def endsWith[B >: T](that: Iterable[B]): Boolean 1239 | ``` 1240 | | 1241 |✓ | 1242 |✓ | 1243 |❌* | 1244 |
| 1248 | 1249 | ```scala 1250 | def startsWithIterable[B >: T](that: IterableOnce[B], offset: Int = 0): Boolean 1251 | ``` 1252 | | 1253 |❌ | 1254 |❌ | 1255 |✓ | 1256 |
| 1259 | 1260 | ```scala 1261 | def endsWithIterable[B >: T](that: Iterable[B]): Boolean 1262 | ``` 1263 | | 1264 |❌ | 1265 |❌ | 1266 |✓ | 1267 |