Skip to content

Commit 55d5602

Browse files
committed
docs(solver): document apply method
1 parent d299034 commit 55d5602

File tree

1 file changed

+2
-0
lines changed
  • src/main/scala/io/github/kelvindev15/prolog/solver

1 file changed

+2
-0
lines changed

src/main/scala/io/github/kelvindev15/prolog/solver/Solver.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ object Solver:
8383
case Halt(exception: Exception)
8484

8585
extension (solution: Solution)
86+
/** Retrieve the substitution term for the provided variable.
87+
*/
8688
def apply(variable: Variable): Option[Term] = solution match
8789
case y: Solution.Yes => Some(y.substitution(variable))
8890
case _ => None

0 commit comments

Comments
 (0)