View Source Guesswork.Ast.Is (Guesswork v0.6.0)
Binds a variable or entity to a function (computation). If a variable is used, the computation is used to figure out its value. If an entity is used, the computation is used to test validity.
Note that, if all the inputs
are concrete, the computation for is can be
resolved before Guesswork.Answer.Result.run/2
is called.
Summary
Types
@type t() :: %Guesswork.Ast.Is{ binding: Guesswork.Ast.Term.entity() | Guesswork.Ast.Variable.t(), func: Guesswork.Answer.Computation.func(), inputs: [Guesswork.Ast.Term.entity() | Guesswork.Ast.Variable.t()] }
Functions
@spec new( Guesswork.Ast.Variable.t() | Guesswork.Ast.Term.entity(), [Guesswork.Ast.Variable.t() | Guesswork.Ast.Term.entity()], Guesswork.Answer.Computation.func() ) :: t()