Add length method for Substitution

This commit is contained in:
Thomas A. Christensen II 2022-12-30 14:45:31 -06:00
parent 3b2730b5c1
commit f08d6eb991

View file

@ -8,6 +8,7 @@ struct Substitution{T<:BioSymbol}
x::T x::T
end end
Base.length(::Substitution) = 1
Base.:(==)(x::Substitution, y::Substitution) = x.x == y.x Base.:(==)(x::Substitution, y::Substitution) = x.x == y.x
Base.hash(x::Substitution, h::UInt) = hash(Substitution, hash(x.x, h)) Base.hash(x::Substitution, h::UInt) = hash(Substitution, hash(x.x, h))