On Saturday, September 13, 2014 5:52:11 PM UTC-5, Jake Bolewski wrote:
>
> One version of a function could handle all parametric expression types, it
> would just have to do runtime lookup similar to what you would have to do
> now,
> so isa(arg, Expr) && (arg::Expr).head === :headB would then just become
> isa(arg, Expr{:headB}).
>
I think not enough people know about Base.Meta.isexpr(). This can already
be written isexpr(arg, :headB)--and if the implementation of Expr changes,
you're still covered.