// Read a utf8 string and count all the occurrences of each letter found `export letter_table : ([string] table : Map[Char; U64] $ () @ string {[letter] ? table `has letter { ^ table `get letter {[count] count +: 1 } } { table `set (letter; 1) } } table ) `is_main ([] `use "sys" [args] ? 3 != `length args { `return `error String $ ( "#BOLD#RED#Got: %#\n" `format " " `join args "#BOLD#WHITE#Usage: % % #\n" `format (args `get 0; args `get 1) ) } read_log : ([filename] `use "io" [open; read] `log letter_table `sync read `sync open `sync filename ) @ 2 .. `length args {[arg_index] read_log `async args `get arg_index } `value )