Skip to content

Instantly share code, notes, and snippets.

@kevinwright
kevinwright / scaladays2014.md
Last active March 8, 2018 20:25
Scaladays 2014 slides

As compiled by Kevin Wright a.k.a @thecoda

(executive producer of the movie, and I didn't even know it... clever huh?)

please, please, please - If you know of any slides/code/whatever not on here, then ping me on twitter or comment this Gist!

This gist will be updated as and when I find new information. So it's probably best not to fork it, or you'll miss the updates!

Monday June 16th

@channingwalton
channingwalton / FizzBuzz.scala
Created October 4, 2012 20:03
FizzBuzz with Scalaz
// Inspired by http://dave.fayr.am/posts/2012-10-4-finding-fizzbuzz.html
object FizzBuzz extends App {
import scalaz._
import Scalaz._
def fizzbuzz(i: Int) = ((i % 3 == 0) option "fizz") |+| ((i % 5 == 0) option "buzz") | i.shows
for (i <- 1 to 100) {println(i + " " + fizzbuzz(i))}
}
@arschles
arschles / typesafeEquals.scala
Created June 20, 2012 20:54
How to use === in scalaz
//declare the data structure and the Equal instance
import scalaz._
import Scalaz._
case class MyThing(thing1: String, thing2: String)
object MyThing {
implicit def MyThingEqual = new Equal[MyThing] {
override def equal(t1: MyThing, t2: MyThing) = (t1.thing1 === t2.thing1) && (t1.thing2 === t2.thing2)
}
anonymous
anonymous / gist:1406238
Created November 29, 2011 20:09
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state