View Source Guesswork.Answer.Computation (Guesswork v0.5.0)

Represents some arbitrary computation that can be bound to a variable or used to verify correctness.

Summary

Functions

Checks the environment for the inputs, and then runs the stored functions. If the inputs are not present or not concrete values, an error is returned.

Types

@type error() :: {:error, {:unbound | :bound_to_var, Guesswork.Ast.Variable.t()}}
@type func() :: (... -> Guesswork.Ast.Term.entity())
@type t() :: %Guesswork.Answer.Computation{
  func: func(),
  inputs: Guesswork.Ast.Term.entity() | Guesswork.Ast.Variable.t()
}

Functions

Checks the environment for the inputs, and then runs the stored functions. If the inputs are not present or not concrete values, an error is returned.