Skip to content

v1.14.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Jan 15:06

TypeUtils v1.14.0

Diff since v1.13.0

This new minor version essentially provides lazymap (see below).

Added

  • B = lazymap([T::Type,], f, A[, f_inv]) yields an object B that lazily maps function f to array or iterator A. Optional argument T is the element-type of B which is automatically inferred if not specified. If A is an (abstract) array, f_inv may be provided to specify the inverse of f. Related type alias LazyMap{T,N,F,typeof(A)} can be used to specialize on the type B with N = ndims(A) and F = typeof(f).

Change

  • The former function as_eltype(T,A) is now a shortcut for lazymap(T,identity,A) unless T == eltype(A) holds in which case A is returned.

  • Private type TypeUtils.AsEltype (formerly used by as_eltytpe) no longer exists.