Task

Show how to get one of your process's environment variables.

The available variables vary by system;   some of the common ones available on Unix include:

   PATH
   HOME
   USER


 
static LILCALLBACK lil_value_t fnc_env(lil_t lil, size_t argc, lil_value_t* argv)
{
    if (!argc) return NULL;
    return lil_alloc_string(getenv(lil_to_string(argv[0])));
}