From 03f33ffe42574aee6b4346f708cae6ee07ac85de Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 1 Jul 2020 19:17:29 -0700 Subject: [PATCH] Add __appendto!!__ (#175) --- src/base.jl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/base.jl b/src/base.jl index 6b9055ae..f4f551ab 100644 --- a/src/base.jl +++ b/src/base.jl @@ -125,7 +125,18 @@ dispatch on the first argument and implemented by the owner of the type of the first argument. """ __append!!__ -@inline __append!!__(xs, ys) = may(_append!, xs, ys) +@inline __append!!__(xs, ys) = __appendto!!__(xs, ys) + +""" + __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!!__`](@ref) is found. +""" +__appendto!!__ +@inline __appendto!!__(xs, ys) = may(_append!, xs, ys) # An indirection for supporting dispatch on the second argument. _append!(dest, src) = append!(dest, src)