samer@0: % afield - arrow to extract named field from structure samer@0: % samer@0: % afield :: N:string ~'field name' -> arrow({struct{N::T;}, {T}, empty). samer@0: % samer@0: % If input is structure with a field named N of type T, samer@0: % the single output is of type T. samer@0: function o=afield(nm,sz) samer@0: o=arr(@(x)getfield(x,nm),'sizefn',@(s){sz}); samer@0: end