Skip to content

Instantly share code, notes, and snippets.

View danieldietrich's full-sized avatar
💭
📡 working from space

Daniel Dietrich danieldietrich

💭
📡 working from space
View GitHub Profile

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array): T[] 🔒 ES3
@danieldietrich
danieldietrich / dropdown.md
Created April 4, 2017 22:07 — forked from citrusui/dropdown.md
"Dropdowns" in Markdown
How do I dropdown? This is how you dropdown.
<details>
<summary>How do I dropdown?</summary>
This is how you dropdown.
@danieldietrich
danieldietrich / auto-deploy.md
Created December 13, 2016 12:25 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

sealed trait TreeLike[M[_]] {
def node[A](f: M[A], g: M[A]): M[A]
}
sealed trait Tree[+A] { self =>
def flatMap[B](f: A => Tree[B]): Tree[B] = self match {
case Leaf(a) => f(a)
case Node(l, r) => Node(l.flatMap(f), r.flatMap(f))
}
}
package labs;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.Arrays;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.stream.Collectors;