Creating a lookup function from dictionary
lookup_function_from_dict(dict, default = identity, dict_key_is_regex = F)
A dictionaryish character vector (named: key -> value)
Value to return if key is not found, or function to evaluate with key as argument
If True, treats dictionary keys are regular expressions when matching
A function which can be called with keys and performs the described lookup, returning the value (string)