scala-tuples


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.github.andyglow
ArtifactId

ArtifactId

scala-tuples_2.13
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

scala-tuples
scala-tuples
Project URL

Project URL

http://github.com/andyglow/scala-tuples
Project Organization

Project Organization

andyglow
Source Code Management

Source Code Management

https://github.com/andyglow/scala-tuples

Download scala-tuples_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.andyglow/scala-tuples_2.13/ -->
<dependency>
    <groupId>com.github.andyglow</groupId>
    <artifactId>scala-tuples_2.13</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.andyglow/scala-tuples_2.13/
implementation 'com.github.andyglow:scala-tuples_2.13:0.1.0'
// https://jarcasting.com/artifacts/com.github.andyglow/scala-tuples_2.13/
implementation ("com.github.andyglow:scala-tuples_2.13:0.1.0")
'com.github.andyglow:scala-tuples_2.13:jar:0.1.0'
<dependency org="com.github.andyglow" name="scala-tuples_2.13" rev="0.1.0">
  <artifact name="scala-tuples_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.andyglow', module='scala-tuples_2.13', version='0.1.0')
)
libraryDependencies += "com.github.andyglow" % "scala-tuples_2.13" % "0.1.0"
[com.github.andyglow/scala-tuples_2.13 "0.1.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.2
org.scala-lang : scala-reflect jar 2.13.2
org.scala-lang : scala-reflect jar 2.13.2
org.scala-lang : scala-reflect jar 2.13.2

test (2)

Group / Artifact Type Version
org.scalatest : scalatest_2.13 jar 3.1.1
org.scalacheck : scalacheck_2.13 jar 1.14.1

Project Modules

There are no modules declared in this project.

Scala Tuple Extensions

Typesafe operations on tuples.

Build Status codecov Maven Central

  • prepend value "abc" +: (1, false) == ("abc", 1, false)
  • append value (1, false) :+ "abc" == (1, false, "abc")
  • concatenate (1, false) :++ ("abc", 3.14) == (1, false, "abc", 3.14); (1, false) ++: ("abc", 3.14) == (1, false, "abc", 3.14)
  • reverse (1, 2, 3).reversed == (3, 2, 1)
  • rotateRight (1, 2, 3).rotatedRight == (3, 1, 2)
  • rotateLeft (1, 2, 3).rotatedLeft == (2, 3, 1)
  • case class ToTuple case class CC(a: Int, b: String, c: Float) ToTuple(CC(1, "b", 3.14)) == (1, "b", 3.14) So this is designed as less type-confusing analog of CC.unapply(CC(1, "b", 3.14)).get
  • case class FromTuple case class CC(a: Int, b: String, c: Float) FromTuple((1, "b", 3.14)).to[CC] == CC(1, "b", 3.14)

Use

SBT

libraryDependencies += "com.andyglow.github" %% "scala-tuples" % "0.1.0"

Maven

<dependency>
  <groupId>com.github.andyglow</groupId>
  <artifactId>scala-tuples_2.13</artifactId>
  <version>0.1.0</version>
</dependency>

Gradle

implementation 'com.github.andyglow:scala-tuples_2.13:0.1.0'

Versions

Version
0.1.0