TypeUtils v1.14.0
This new minor version essentially provides lazymap (see below).
Added
B = lazymap([T::Type,], f, A[, f_inv])yields an objectBthat lazily maps functionfto array or iteratorA. Optional argumentTis the element-type ofBwhich is automatically inferred if not specified. IfAis an (abstract) array,f_invmay be provided to specify the inverse off. Related type aliasLazyMap{T,N,F,typeof(A)}can be used to specialize on the typeBwithN = ndims(A)andF = typeof(f).
Change
-
The former function
as_eltype(T,A)is now a shortcut forlazymap(T,identity,A)unlessT == eltype(A)holds in which caseAis returned. -
Private type
TypeUtils.AsEltype(formerly used byas_eltytpe) no longer exists.