On this page:
amb  Kanren:   mini  Kanren Based on amb
9.3

ambKanren: miniKanren Based on amb🔗ℹ

ambKanren is a miniKanren in which backtracking is not implemented by a stream of answers but delegated to the ambiguous operator amb of the typed/amb library. A goal is an ordinary function from substitutions to substitutions (from states to states, in microKanren); when a goal fails it calls (amb), and when it has several answers it chooses one of them with amb. The search over all choices is performed by in-amb/do, which run uses to collect answers.

The package provides one module for each language it implements:

    1 microKanren

      1.1 From Streams to amb

        1.1.1 Suspension and the Order of Answers

      1.2 Types

      1.3 The Core

      1.4 User-Level Forms

    2 First Edition

      2.1 Implementation Basis

      2.2 Types

      2.3 Running Programs

      2.4 Goals

        2.4.1 Interleaving

      2.5 Substitutions and Unification

      2.6 Symbolic Aliases

    3 Second Edition

      3.1 Implementation Basis

        3.1.1 Order of Answers

      3.2 Types

      3.3 Running Programs

      3.4 Goals and Relations

      3.5 Substitutions and Unification