|
Scala example source code file (SetTest.scala)
The SetTest.scala Scala example source codepackage scalaz package std import syntax.foldable._ import std.AllInstances._ import scalaz.scalacheck.ScalazProperties._ object SetTest extends SpecLite { checkAll(order.laws[Set[Int]]) checkAll(monoid.laws[Set[Int]]) checkAll(isEmpty.laws[Set]) checkAll(foldable.laws[Set]) checkAll(FoldableTests.anyAndAllLazy[Set]) "foldLeftM" should { // as reported in <https://github.com/scalaz/scalaz/issues/866> // fixed in b0b80be "not stack overflow" in { def sum = Set(1,2,3).foldLeftM[Option,Int](0) { case (x,y) => Some(x+y) } sum must_== Some(6) } } } Other Scala examples (source code examples)Here is a short list of links related to this Scala SetTest.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 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.