Files
mercury/samples/all_solutions.m
Fergus Henderson 2c4bd735b4 Add comment "This source file is hereby placed in the public domain".
Estimated hours taken: 0.25

samples/*:
	Add comment "This source file is hereby placed in the public domain".
1997-09-10 11:01:12 +00:00

24 lines
489 B
Mathematica

% An example program to illustrate the use of all-solutions predicates
% in Mercury.
% This source file is hereby placed in the public domain. -fjh (the author).
:- module all_solutions.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
:- import_module std_util.
main -->
{ solutions(hello, List) },
io__write_strings(List).
:- pred hello(string::out) is multidet.
hello("Hello, world\n").
hello("Hello again, world\n").