Skip to content

Instantly share code, notes, and snippets.

View strager's full-sized avatar

strager strager

View GitHub Profile
View gist:a8f1cc09b79cb07f3ef9e5cd13b8f308
https://gist.github.com/JanPoonthong/f388e9bedfff977a6230a1b3f70cc3c2
View z3tr.py
from functools import singledispatchmethod
class Negator:
@singledispatchmethod
def neg(self, arg):
raise NotImplementedError("Cannot negate a")
@neg.register
def _(self, arg: int):
return -arg
View semicolon.diff
src/include/quick-lint-js/parse.h
View realgavle.java
public static void countupA(int n) {
if (n == 0) {
System.out.println("blast off");
} else {
countupB(n - 1);
System.out.println(n);
}
}
public static void countupB(int n) {
View gist:ba7f9bef0bda492a86fde713dd97cc16
https://gist.github.com/76a5a4e6b20e97fc5794242bcb2b43ae