How coud I echo the first 10 values from the wordFequencies.sort() hereunder?
    
    
    import strutils
    import tables
    
    
    proc main() =
        var wordFequencies = initCountTable[string]()
        
        # Populating dict from file:
        for line in lines "100-0.txt":
            for word in line.split(" "):
                wordFequencies.inc(word)
        
        wordFequencies.sort()
    
    when isMainModule:
        main()
    
    
    
    Run

Reply via email to