alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (LazyTupleTest.scala)

This example Scala source code file (LazyTupleTest.scala) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Scala by Example" TM.

Learn more about this Scala project at its project page.

Java - Scala tags/keywords

int, lazytuple2, lazytuple3, lazytuple4, lazytupletest, speclite

The LazyTupleTest.scala Scala example source code

package scalaz

import std.AllInstances._
import scalaz.scalacheck.ScalazProperties._
import scalaz.scalacheck.ScalazArbitrary._

object LazyTupleTest extends SpecLite {

  type A = Int
  type B = Int
  type C = Int
  type D = Int

  checkAll("LazyTuple2", bitraverse.laws[LazyTuple2])

  checkAll("LazyTuple2", order.laws[LazyTuple2[A, B]])
  checkAll("LazyTuple3", order.laws[LazyTuple3[A, B, C]])
  checkAll("LazyTuple4", order.laws[LazyTuple4[A, B, C, D]])

  checkAll("LazyTuple2", monoid.laws[LazyTuple2[A, B]])
  checkAll("LazyTuple3", monoid.laws[LazyTuple3[A, B, C]])
  checkAll("LazyTuple4", monoid.laws[LazyTuple4[A, B, C, D]])

  checkAll("LazyTuple2", monad.laws[LazyTuple2[B, ?]])
  checkAll("LazyTuple3", monad.laws[LazyTuple3[B, C, ?]])
  checkAll("LazyTuple4", monad.laws[LazyTuple4[B, C, D, ?]])

  checkAll("LazyTuple2", associative.laws[LazyTuple2])
}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala LazyTupleTest.scala source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.