The best part of the holy trait pattern is that we can use it with any object, even when its type belongs to a different abstract type hierarchy. Let's explore the case of literature, where we may define its own type hierarchy as follows:
abstract type Literature end
struct Book <: Literature
name
end
Now, we can make it obey the LiquidityStyle trait, as follows:
# assign trait
LiquidityStyle(::Type{Book}) = IsLiquid()
# sample pricing function
marketprice(b::Book) = 10.0
Now, we can trade books, just like other tradable assets.