2 ms·
type Card = (Any, Any) type Deck = Seq[Card] val foo: Deck = Seq((4, 'clubs), ('king, 'diamonds)) It seems to work over here. I would have to be a bit out
by anonymoushn 13y ago
type Card = (Any, Any)
type Deck = Seq[Card]
val foo: Deck = Seq((4, 'clubs), ('king, 'diamonds))
It seems to work over here. I would have to be a bit out of my mind to actually want to write code this way, though.
As to the "Lightweight data modeling" pitch, there's a pretty large number of other languages that are better suited to this because they have TCO (when run on their main platforms, the analogues of the Sun JVM) and don't require you to debug apparently-endless stack traces in a different language when your completely untyped exploration/prototype inevitably explodes.