Skip to content

Instantly share code, notes, and snippets.

@passindro
passindro / hkt.jl
Created December 21, 2018 13:53
power@thautwarm
struct Fn{A, B}
f :: Function
end
function (f::Fn{A, B})(a :: A) :: B where {A, B}
f.f(a)
end
abstract type Sig end
@passindro
passindro / match_expr.jl
Last active December 21, 2018 07:02
For Redy@thautwarm
function emmmm(expr, guard)
@match expr begin
:(function $_(a, b, $(_...), $last)
$(block...) end)
where guard(last) => (last, block)
end
end
head = x->x[1]