I hereby claim:
- I am fomkin on github.
- I am fomkin (https://keybase.io/fomkin) on keybase.
- I have a public key whose fingerprint is 6BEE BA4C 8D4C 6826 0A5D 4253 1125 8561 B6FA 7169
To claim this, I am signing this object:
def evenlyDivisibleBy(divider: Int): Int ^^ Int = Extractor { | |
case n if n % divider == 0 => n | |
} | |
val evenlyDivisibleByFive = evenlyDivisibleBy(5) | |
val evenlyDivisibleByThree = evenlyDivisibleBy(3) | |
val evenlyDivisibleByFifteen = evenlyDivisibleBy(15) | |
def fizzbuzz(x: Int) = x match { | |
case evenlyDivisibleByFifteen(_) => "fizzbuzz" |
var bb = new Blob([` | |
onmessage = function(e) { | |
postMessage('pong'); | |
}; | |
postMessage('started'); | |
`]); | |
var worker = new Worker(window.URL.createObjectURL(bb)); | |
var startTime = -1; |
I hereby claim:
To claim this, I am signing this object:
import shapeless._ | |
import shapeless.nat._ | |
import shapeless.ops.nat.GT._ | |
import shapeless.ops.nat.GTEq._ | |
import shapeless.ops.nat._ | |
import shapeless.syntax.sized._ | |
import scala.collection.mutable | |
/** |
/* | |
Copyright 2012 Viktor Klang | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
case class Style(xs: Map[String, String]) { | |
def +(s: Style) = Style(xs ++ s.xs) | |
def mkString = xs | |
.map { case (k, v) => s"$k: $v;" } | |
.mkString(" ") | |
} | |
object Style { |
case class BTree[K, V](root: BTree.Node[K, V], order: Int)(implicit keyOrdering: Ordering[K]) { | |
import keyOrdering.mkOrderingOps | |
private type N = BTree.Node[K, V] | |
private type E = BTree.Entry[K, V] | |
def get(key: K): Option[V] = { | |
def aux(node: N): Option[V] = { | |
val mayBeEntry = node.entries.find(_.key == key) |
final class JavaTimerScheduler { | |
private val timer = new Timer() | |
def scheduleOnce[T](delay: FiniteDuration)(job: => T)(implicit ec: ExecutionContext): JobHandler[T] = { | |
val promise = Promise[T] | |
val task = new TimerTask { | |
def run(): Unit = { | |
Future { | |
val result = job // Execute a job |
val users = Vector( | |
"@demyanam1", | |
"@CipHuK", | |
"@sergey_samoylov", | |
"@ermakovolegs", | |
"@wouzar", | |
"@_sashashakun", | |
"@myBloodyScala", | |
"@lmnet89", | |
"@laughedelic", |
import scala.xml.XML | |
import scala.xml.{Node => XmlNode} | |
import levsha.Document.Node | |
def nodeFromHtml[T](html: String): Node[T] = Node[T] { rc => | |
val document = XML.loadString(html) | |
def aux(node: XmlNode): Unit = node match { | |
case scala.xml.Text(text) => | |
rc.addTextNode(text) | |
case _ => |