Skip to content

Instantly share code, notes, and snippets.

sealed trait Term
case class TmVar(value: Any) extends Term {
override def toString: String = s"$value"
}
case class TmAbs(x: Term, t: Term) extends Term {
override def toString: String = s"λ($x.$t)"
}
case class TmApply(t1: Term, t2: Term) extends Term {
override def toString: String = s"($t1 $t2)"
// λx.t :: (x: Any) => t
// t t :: t(t)
implicit class DirtyAny(self: Any) {
def apply(): Any = self match {
case f: (Unit => Any) => f()
}
def apply(that: Any): Any = self match {
case f: (Any => Any) => f(that)
}
sealed trait Term
case class TmVar(value: Any) extends Term {
override def toString: String = s"$value"
}
case class TmAbs(x: Term, t: Term) extends Term {
override def toString: String = s"λ($x.$t)"
}
case class TmApply(t1: Term, t2: Term) extends Term {
override def toString: String = s"($t1 $t2)"
@bakenezumi
bakenezumi / exapunks-meet-up-2018-09-22.md
Last active September 24, 2018 17:07
Artifacts of EXAPUNKS meet-up at September 22, 2018

ZYZZY SAFE 2000™ API - SAFEST AROUND

  • XA

    LINK 800
    MAKE
    
    MARK DIGIT1
    COPY X #PASS
    

EXAPUNKS最適化Tips

  1. ファイルは1サイクルで2項目読める

    Before(2 cycle)

    COPY F X
    ADDI X F X
    
package xsbt
import scala.reflect.NameTransformer
import scala.tools.nsc.Global
object SemanticDBHelper {
def semanticName[GlobalType <: Global](g: GlobalType)(sym: g.Symbol): String = {
var b: java.lang.StringBuffer = null
@bakenezumi
bakenezumi / semanticdb3.json
Created April 2, 2018 05:44
Bridge interface between sbt and semanticdb
{
"types": [
{
"name": "Range",
"namespace": "xsbti.semanticdb3",
"target": "Java",
"type": "record",
"doc": [
"<code>Range</Code> in SemanticDB directly corresponds to <code>Range</code> in LSP.",
"@see <a href='https://github.com/scalameta/scalameta/blob/master/semanticdb/semanticdb3/semanticdb3.md#range'>scalameta/semanticdb3#Range</a>",