Skip to content

Instantly share code, notes, and snippets.

@bhudgeons
bhudgeons / StreamTest.java
Last active August 29, 2015 14:06
Java Stream "Monad" LOL
import java.util.List;
import java.util.ArrayList;
import java.util.stream.Stream;
public class StreamTest {
public static void main(String[] args) {
List<Integer> list = new ArrayList<Integer>();
list.add(1);
list.add(2);
list.add(3);
import akka.actor.ActorSystem
import akka.actor.Props
import akka.actor.Actor
import akka.actor.ActorRef
import akka.pattern.ask
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._
import akka.util.Timeout
@bhudgeons
bhudgeons / named.scala
Last active August 29, 2015 14:07 — forked from paulp/named.scala
class A {
def f(x: Int, y: Int) = ((x, y))
def name = "A"
}
class B extends A {
override def f(y: Int, x: Int) = ((y, x))
override def name="B"
}
Verifying that +bhudgeons is my openname (Bitcoin username). https://onename.io/bhudgeons