This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MultiKeyDict() constructor { | |
dict = {}; | |
/** | |
* @desc Stores a value at a specified path. Creates intermediate structs for missing keys. | |
* Requires at least 2 arguments (1+ keys and 1 value). Non-struct intermediates will be overwritten | |
* | |
* @param {String|Any} keys - Sequence of keys followed by the value to store (last argument) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.IO | |
import Data.String | |
import Data.List | |
import Data.Text ( splitOn, unpack, pack ) | |
import Text.Printf | |
main = do | |
input <- readFile "./input.srt" | |
writeFile "./output.srt" (unlines (parseInput (lines input))) |