Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1 @@
multiply(A, B, P) :- P is A * B.

View file

@ -0,0 +1,3 @@
go :-
multiply(5, 2, P),
format("The product is ~d.~n", [P]).

View file

@ -0,0 +1,3 @@
test_multiply :-
multiply(5, 2, 10), % this will pass
multiply(3, 4, 11). % this will not pass

View file

@ -0,0 +1,6 @@
:- use_module(library(function_expansion)).
user:function_expansion(multiply(A, B), P, P is A * B). % "function" definition
go :-
format("The product is ~d.~n", [multiply(5, 2)]).

View file

@ -0,0 +1,3 @@
go :-
A is 5*2,
format('The product is ~d.~n', [A]).