default


License

License

MIT
GroupId

GroupId

io.chrisdavenport
ArtifactId

ArtifactId

default_2.12
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

default
default
Project URL

Project URL

https://github.com/ChristopherDavenport/default
Project Organization

Project Organization

io.chrisdavenport
Source Code Management

Source Code Management

https://github.com/ChristopherDavenport/default

Download default_2.12

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.8
org.typelevel : cats-core_2.12 jar 1.6.0

test (2)

Group / Artifact Type Version
org.specs2 : specs2-core_2.12 jar 4.4.1
org.specs2 : specs2-scalacheck_2.12 jar 4.4.1

Project Modules

There are no modules declared in this project.

default Build Status Maven Central

A typeclass approach for default values in Scala. The topic of much scorn in Haskell, I find the existence of this typeclass to be superior to the general use Monoid everywhere as though it was a default value.

Default exists to allow you to have something that expresses what you want, even if it might not be what you actually need.

Default exists as a typeclass that allows Default[A].default: A, it exposes in the package object def default[A: Default]: A which you will likely find useful to remove the ceremony of summoning the typeclass to use.

Quick Start

To use this project in an existing SBT project with Scala 2.11 or a later version, add the following dependencies to your build.sbt depending on your needs:

libraryDependencies ++= Seq(
  "io.chrisdavenport" %% "default"     % "<version>"
)

Versions

Version
0.1.0
0.0.1