zenna / Arrows.jl

14 stars 2 forks source link

Make SubArrow parametric over arrow type #79

Closed zenna closed 6 years ago

zenna commented 6 years ago

Perhapss we should have SubArrow{ArrowType}.

Currently we often need to dispatch on the arrow type, but we often need access to the SubArrow, so we do something like

f(sarr::SubArrow) = f(sarr, deref(sarr))
f(sarr::SubArrow, ::AddArrow) ...

Instead we could just do

f(sarr::SubArrow{AddArrow})

The downside of course is that the type of a SubArrow could not change.

zenna commented 6 years ago

Implemented on 2b0908e78ca430fe7fad4ae7953a7e016410775e