case Suit {
case hearts(String)
case diamonds(String)
case clubs(String)
case spades(String)
}
I get that every language uses the same example for better comparison. It would be easier to demonstrate that each case holds its own set of associated values with a different example where each case holds different arity and type of assoc values.
I get that every language uses the same example for better comparison. It would be easier to demonstrate that each case holds its own set of associated values with a different example where each case holds different arity and type of assoc values.