Skip to content

ambutils

Bill Hails edited this page Nov 9, 2024 · 4 revisions

The namespace fn/ambutils.fn contains a few utilities for working with then and back.

Fn Description
require(condition) Backtracks if condition is not true.
one_of(list) Successively generates each element of the list, backtracking further when the list is exhausted.
some_of (list) Successively generates each non-empty subset of the list, backtracking further when the list is exhausted.
integers_from(n) Generates all integers, starting from n. Never backtracks.
integers_between(lower, upper) Generates all integers between lower and upper inclusive, backtracks when exhausted.

Next: IO Utils

Clone this wiki locally