I hereby claim:
- I am echojc on github.
- I am echojc (https://keybase.io/echojc) on keybase.
- I have a public key whose fingerprint is E148 7B9D 3EA0 06A2 CF53 9A81 389D F30E 7772 F372
To claim this, I am signing this object:
def transpose[T](list: List[List[T]]): List[T] = | |
if (list.isEmpty) Nil | |
else (list map { _.head }) ::: | |
transpose(list map { _.tail} filter { !_.isEmpty }) |
transpose :: [[a]] -> [a] | |
transpose [] = [] | |
transpose input = map head input ++ | |
transpose (filter (not . null) (map tail input)) |
import scala.language.experimental.macros | |
import scala.reflect.macros.Context | |
import spray.json._ | |
trait ImplicitJsonFormat | |
object ImplicitJsonFormat { | |
implicit def materializeJsonFormat[T]: JsonFormat[T] = macro jfImpl[T] |
object Conway { | |
type Cell = (Int, Int) | |
type World = Set[Cell] | |
def next(w: World): World = w flatMap expand filter alive(w) | |
private def expand(c: Cell): Set[Cell] = | |
(for (x <- -1 to 1; y <- -1 to 1) yield (c._1 + x, c._2 + y)).toSet | |
private def alive(w: World)(c: Cell): Boolean = { |
trait MapReader[T] { | |
// should really return Option[T], but let's keep it simple in this example | |
def read(map: Map[String, Any], key: String): T | |
} | |
object MapReader extends MapReaderLowPriorityImplicits { | |
// convenience method to retrieve implicit instance explicitly | |
def apply[T: MapReader]: MapReader[T] = implicitly[MapReader[T]] | |
// these implicits are always implicitly available as long as `MapReader` is in scope |
I hereby claim:
To claim this, I am signing this object:
[name] simon says | |
[puzzle] SzSandbox | |
[traces] | |
...................... | |
..154.....1555554..... | |
......14..1555D54.15C. | |
...94.154..14.2...1CA. | |
..16...14..955555556A. | |
.....1414.161414....A. |
<!doctype html> | |
<html> | |
<head> | |
<title>vim demo</title> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet"> | |
<style> | |
html, | |
body { | |
height: 100%; |
{ | |
init: function (elevators, floors) { | |
const floor_up_pressed = {}; | |
const floor_down_pressed = {}; | |
floors.forEach(floor => { | |
const f = floor; | |
f.on('up_button_pressed', () => { | |
floor_up_pressed[f.floorNum()] = true; | |
}); |
@media print { | |
a { | |
text-decoration: none; | |
} | |
a::after { | |
display: none; | |
content: ''; | |
} |