Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am lambdista on github.
  • I am lambdista (https://keybase.io/lambdista) on keybase.
  • I have a public key ASDxgJuAMH2ZNXuBAkuY3dukvJ5nOs27dAaFTA3ZlfoRhAo

To claim this, I am signing this object:

// using scalafmt if I format a class whose fields run over the max length the resulting code looks like this:
final case class FooBarBaz(foo: String,
bar: Int,
baz: Long,
...)
// BUT if, before formatting, I do something like the following:
final case class FooBarBaz(
foo: String,
bar: Int,
@lambdista
lambdista / 00. tutorial.md
Created June 15, 2016 11:39 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25).
Type in expressions for evaluation. Or try :help.
scala> import scala.language.higherKinds
import scala.language.higherKinds
scala> :paste
// Entering paste mode (ctrl-D to finish)
def foo[F[_], A](fa: F[A]): String = fa.toString
case class Operand[A](key: String, value: A)
case class Foo(id: Long, bar: String)
trait Operation[A] {
def operator: String
def operand: Option[Operand[A]]
}
object Poly {
trait Case[A] {
type Result
def at(x: A): Result
}
trait PolyDef {
def apply[A : Case](x: A): Case[A]#Result
}