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