Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block fayvor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6241250
* The Matrix Example
import collection.JavaConversions._
import org.neo4j._
import org.neo4j.graphdb._
import org.neo4j.graphdb.Traverser._
import org.neo4j.scala._
View gist:6165505
// merge calls itself recursively
def merge(l1: List[Int], l2: List[Int]): List[Int] = {
// termination cases
(l1, l2) match {
case (Nil, Nil) => Nil
case (x, Nil) => x
case (Nil, y) => y
case (_, _) => match {
case -1 => l1.head :: merge(l1.tail, l2)
case _ => l2.head :: merge(l2.tail, l1)
You can’t perform that action at this time.