Internals

LinearCombinations.unvalFunction
LinearCombinations.unval(x)

Return c if the argument x is of type Val{c} and x itself otherwise.

This can be used to write type-stable code for the coefftype keyword argument to linear and multilinear functions.

See also @linear, @linear_kw, @multilinear.

Examples

julia> LinearCombinations.unval(Char)
Char

julia> LinearCombinations.unval(Val(Char))
Char
source