Skip to content

Instantly share code, notes, and snippets.

Avatar

Matteo De Martino emmedema

View GitHub Profile
@davidallsopp
davidallsopp / Shrinking.scala
Last active Sep 26, 2020
Solutions to the ScalaCheck problem that shrinking failing values may generate invalid values, because the constraints of the generator are not respected. This is for using ScalaCheck from within ScalaTest.
View Shrinking.scala
import org.scalatest._
import prop._
import org.scalacheck.Arbitrary._
import org.scalacheck.Gen
/**
* Solutions to the ScalaCheck problem that shrinking failing values may generate
* invalid values, because the constraints of the generator are not respected.
*
* See also http://stackoverflow.com/questions/20037900/scalacheck-wont-properly-report-the-failing-case
@MishaelRosenthal
MishaelRosenthal / DirectedGraphTraversals.scala
Created May 15, 2014
Directed Graph Traversals Implementations are tail recursive and uses only immutable data structures. These implementations are not more efficient than non tail recursive implementations.
View DirectedGraphTraversals.scala
package com.liveperson.predictivedialer.examples.misc
import scala.annotation.tailrec
import scala.util.Try
/**
* Created with IntelliJ IDEA.
* User: mishaelr
* Date: 5/14/14
* Time: 5:18 PM
You can’t perform that action at this time.