Skip to content

Instantly share code, notes, and snippets.

View markknol's full-sized avatar
🧪
Doodling around

Mark Knol markknol

🧪
Doodling around
View GitHub Profile
@markknol
markknol / Main.hx
Created December 28, 2019 10:51 — forked from jdonaldson/Main.hx
Paths example
class Main {
static function main(){
var router = Paths.buildRouter(Page);
var o = router(["Home"]);
trace(o + " is the value for o");
var p = router(["Foo","Baz", "1"]);
trace(p + " is the value for p");
@markknol
markknol / combinators.hx
Last active February 20, 2018 19:45 — forked from Avaq/combinators.js
Common combinators in Haxe 4
static final I = x -> x;
static final K = x -> y -> x;
static final A = f -> x -> f(x);
static final T = x -> f -> f(x);
static final W = f -> x -> f(x)(x);
static final C = f -> y -> x -> f(x)(y);
static final B = f -> g -> x -> f(g(x));
static final S = f -> g -> x -> f(x)(g(x));
static final P = f -> g -> x -> y -> f(g(x))(g(y));