In Python, we can do this.
board = {'us': {'name': 'USA', 'govern': 'good'},
'canada': {'name': 'Canada', 'govern': 'good'},
'uk': {'name': 'UK', 'govern': 'good', 'recruit': 3},
'spain': {'name': 'Spain', 'govern': 'good', 'schengen': True, 'recruit': 2},
'france': {'name': 'France', 'govern': 'good', 'schengen': True, 'recruit': 2},
'italy': {'name': 'italy', 'govern': 'good', 'schengen': True} }
to create a dictionary of name value pairs for easy lookup. Can I the the same in Stanza language, like:
deftype Countries <: Table<String,Table<String,?>>
; value could be anything. we see Int|String|True|False here
val board : Countries = to-table( "us" => ( "name" => "USA", "govern" => "good" ), ....)
?
I kind of come up with a solution: