This file contains 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
{-# LANGUAGE DeriveTraversable #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Data.Trie ( | |
Trie, | |
singleton, | |
insert, | |
delete, |
This file contains 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
#! /usr/bin/env python3 | |
from dataclasses import dataclass, field | |
from typing import List | |
from dataclass_wizard import YAMLWizard | |
@dataclass | |
class Thing(YAMLWizard): |
This file contains 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
<!-- Each entry is a child, which has a key child and a val child --> | |
<map> | |
<entry> | |
<key>foo</key> | |
<val>bar</val> | |
</entry> | |
<entry> | |
<key>baz</key> | |
<val>qux</val> | |
</entry> |
This file contains 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 try_require(module_name) | |
local success, module = pcall(require, module_name) | |
local first_time = true | |
return function() | |
if success and first_time then | |
first_time = false | |
return module | |
end | |
end |