Skip to content

Instantly share code, notes, and snippets.

Doing my stuff

Filippo De Luca filosganga

Doing my stuff
View GitHub Profile
filosganga /
Last active Dec 26, 2015
It implements an Iterable that take elements from a list of Iterable in a round robin fashion. The test is most explicative than the description.
import static;
import static;
import static;
import static java.util.Arrays.asList;
import java.util.Iterator;
View blockchainID
Verifying that +filosganga is my blockchain ID.
filosganga / FizzBuzz.scala
Created Nov 7, 2012
FizzBuzz implementation
View FizzBuzz.scala
class FizzBuzz(divisors = Map(3->"Fizz", 5->"Buzz")) {
def fizzBuzz(n: Int): String = {
divisors.foldLeft(""){(res, d)=>
n % d._1 match {
case 0 => res + d._2
case _ => res
} match {
case "" => n.toString
filosganga / .gitignore
Last active Aug 29, 2015 — forked from mpilquist/.gitignore
Simulacrum Example
View CssParser.scala
import util.parsing.combinator.JavaTokenParsers
case class Rule(val selectors : List[String], val properties : List[Property])
case class Property(name: String, value: String)
object CssParser extends JavaTokenParsers {
def rules = rule+