Internals
BangBang.Extras.broadcast_inplace!! — Function
broadcast_inplace!!(f, inputoutput, As...) -> inputoutput′A mutate-or-widen version of inputoutput .= f.(inputoutput, As...).
BangBang.__append!!__ — Function
__append!!__(dest::CustomType, src) -> dest′This is an overload interface for append!!. This function must dispatch on the first argument and implemented by the owner of the type of the first argument.
BangBang.__appendto!!__ — Function
__appendto!!__(dest, src::CustomType) -> dest′This is an overload interface for append!!. This function must dispatch on the second argument and implemented by the owner of the type of second first argument. This function is used when there is no specific implementation for __append!!__ is found.
BangBang.implements — Function
implements(f!, x) :: Booltrue if in-place function f! can mutate x.
Examples
julia> using BangBang: implements
julia> implements(push!, Vector)
true
julia> implements(push!, []) # works with instances, too
true
julia> implements(push!, Tuple)
false
julia> using StaticArrays
julia> implements(push!, SVector)
false
julia> implements(setindex!, SVector)
false
julia> implements(push!, MVector)
false
julia> implements(setindex!, MVector)
trueBangBang.may — Function
may(mutate!, args...)Call mutate!(args...) if possible; fallback to the out-of-place version if not.
BangBang.possible — Function
possible(f!, args...) :: BoolCheck if f!(args...) is possible.
Examples
julia> using BangBang: possible
julia> possible(push!, Int[], 1)
true
julia> possible(push!, Int[], 0.5)
falseBangBang.resize!! — Function
resize!!(vector::AbstractVector, n::Integer) -> vector′