It's annoying to have to make each edit in two places. Deducing the table from an array of facts fixes that.
And this will also help save changes on edit. Though I still have some open questions in my mind about how to go back from table to array of facts..
(results is a snapshot of https://en.wikipedia.org/wiki/2023_Cricket_World_Cup)
T2DONXNWMEH4N5S7DVHKA35AHRXWRH3OBFQRS6Z5BHIRVKA5IGJAC NZ beat EngPak beat NedBan beat AfgSA beat SLInd beat AusNZ beat NedPak beat SLInd beat AfgSA beat AusNZ beat BanInd beat PakAfg beat EngAus beat SL
load_results = function(filename)results = {}local f, err = App.open_for_reading(filename)if err then error(err) endfor line in f:lines() dolocal subject, object = line:match('^%s*(%S+)%s+beat%s+(%S+)%s*$')if subject == nil thenerror('incorrect format: '..line)endif results[subject] == nil thenresults[subject] = {}endresults[subject][object] = 2if results[object] == nil thenresults[object] = {}endresults[object][subject] = 0endf:close()return resultsend