Pudu programming language
Menu

Std.App.Config.discover

1 declaration

fn

discover: &Array[(Str, Str)] -> Str -> Result[Std.App.Config.Config, Std.App.Config.ConfigError]

This is a callable function.

What it does

The configuration a program gets when it does not say otherwise: its own

declared defaults, the named file, the machine, and this invocation, in

that order, with the profile selected by an argument or the environment.

This is the whole of what most programs want from configuration, and it is

one call so that they can have it in one call. Everything it does is a

public function below it, so a program needing a different arrangement

writes that arrangement rather than working around this one.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.
  • Names inside [ ] are type arguments, such as the item type held by a collection.
  • Result makes success and recoverable failure part of the function's type.

Back to Std.App.ConfigSearch related declarations