mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 20:03:44 +00:00
Estimated hours taken: 0.25 samples/*: Add comment "This source file is hereby placed in the public domain".
24 lines
489 B
Mathematica
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").
|
|
|