Although, as demonstrated above, one can program in the core μKanren language, a user may rightly desire a more sophisticated set of tools with which to program and through which to view the results. A sample set of such tools is provided.
conj : List (() -> MicroKanren.Kernel.Goal a) -> MicroKanren.Kernel.Goal a
Too, manually nesting calls to conj and disj can quickly grow tiresome. The macros conj and disj introduced below provide the conjoin and disjoin of one or more goals.
disj : List (() -> MicroKanren.Kernel.Goal a) -> MicroKanren.Kernel.Goal a
Too, manually nesting calls to conj and disj can quickly grow tiresome. The macros conj and disj introduced below provide the conjoin and disjoin of one or more goals.
pull : MicroKanren.Kernel.Stream a -> MicroKanren.Kernel.Stream a
Invoking an immature stream to return results needn't be performed manually.
With an operator like pull below, this could instead be done automatically.
take : Basics.Int -> MicroKanren.Kernel.Stream a -> List (MicroKanren.Kernel.State a)
take pulls the first n or as many results as the stream contains, whichever is least.
zzz : (() -> MicroKanren.Kernel.Goal a) -> MicroKanren.Kernel.Goal a
Perform the inverse-η-delay.
Manually performing the inverse-η-delay can quickly become tedious. The user can instead employ the below macro Zzz (pronounced "snooze") to relieve some of the tedium.
In the paper this is a macro, which Elm does not have. So we delay the evaluation of the goal by hiding it behind an abstraction.