Giter Club home page Giter Club logo

hamsters's Introduction

Hamsters

A mini Scala utility library. Compatible with functional programming beginners. For the JVM and Scala.js.

hamster logo

Currently, Hamsters supports :

Travis

Install as dependency

With SBT :

libraryDependencies ++= Seq(
  "io.github.scala-hamsters" %% "hamsters" % "2.6.0"
)

With Maven :

<dependency>
  <groupId>io.github.scala-hamsters</groupId>
  <artifactId>hamsters_${scala.version}</artifactId>
  <version>2.6.0</version>
</dependency>

For Scala.js :

libraryDependencies ++= Seq(
  "io.github.scala-hamsters" %%% "hamsters" % "2.6.0"
)

Try Hamsters in ScalaFiddle or Ammonite

You can try quickly and easily Hamsters with ScalaFiddle.
Example : https://scalafiddle.io/sf/BDm8W4U/0

Alternatively, a REPL script is provided. try-hamster.sh script downloads and installs Coursier, Ammonite REPL and Hamsters dependency. No dependencies needed other than a JDK.

PS: The macros don't work with the REPL

curl -s https://raw.githubusercontent.com/scala-hamsters/hamsters/master/scripts/try-hamsters.sh | bash

Loading...
Welcome to the Ammonite Repl 1.0.1
(Scala 2.12.3 Java 1.8.0_151)

@ val noneString: Option[String] = None 
noneString: Option[String] = None

@ noneString.orEmpty 
res1: String = ""

@ val hlist1: Double :: String :: HNil = 2.0 :: "hi" :: HNil 
hlist1: Double :: String :: HNil = HCons(2.0, HCons("hi", HNIL))

@ exit 
Bye!

1.x to 2.0 Migration

Validation.result has been renamed to Validation.run.

Extensions

See hamsters-extensions for more information.

Scaladoc

You can find the API documentation here.

Special thanks

To Laurencebeillaux who created the Hamsters logo.

hamsters's People

Contributors

andys8 avatar dgouyette avatar francisdb avatar k33g avatar loicdescotte avatar ludoviclafole avatar oraclewalid avatar raulraja avatar remk avatar thomasgrt avatar urcadox avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.