I hereby claim:
- I am filippovitale on github.
- I am filippovitale (https://keybase.io/filippovitale) on keybase.
- I have a public key whose fingerprint is D500 122C 2E12 6B3F E9B7 1577 051C 7654 7F1C 75E1
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Verifying that +filippovitale is my Bitcoin username. You can send me #bitcoin here: https://onename.io/filippovitale |
/** | |
* reference: http://www.cs.ox.ac.uk/ralf.hinze/publications/GGTries/Encode.lhs | |
*/ | |
object GenTrie { | |
sealed trait Bit | |
case object △ extends Bit | |
case object ▲ extends Bit | |
type Bits = List[Bit] |
import org.scalameter.api._ | |
import scala.collection.mutable | |
/** | |
* Source code related to the presentation: "Will it blend?" | |
* ScalaSyd Episode 33 - February 2015 | |
*/ | |
class BlendBenchmark extends PerformanceTest.OfflineReport { |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<true/> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>SERVER_JVMFLAGS</key> | |
<string>-Dapple.awt.UIElement=true</string> |
import org.specs2._ | |
import scalaz.syntax.id._ | |
/** | |
* https://github.com/swlaschin/PropertyBasedTesting/blob/master/part2.fsx | |
*/ | |
class Examples extends Specification with ScalaCheck { | |
def is = commutative ^ inverse ^ easyToVerify ^ invariant ^ structuralInduction ^ idempotent ^ oracle | |
/** |
import org.specs2._ | |
import scalaz._, Scalaz._ | |
class SendMoreMoneySpec extends Specification { def is = s2""" | |
Using the List Monad | |
List(1, 2) $tl1 | |
List(1, 2) if a != b $tl2 | |
List(1, 2, 3) $tl3 | |
Map('a' -> a, 'b' -> b) $tl4 | |
s.eval(List(1, 2)) $ts1 |
trait MyOption[A] { | |
def fold[B](n: => B, s: A => B): B | |
// Define the usual Option API. | |
// | |
// * Constructors (on the object) | |
// some | |
// none | |
// * methods | |
// map |