Questions tagged [prolog]

Prolog is the most commonly used logic programming language. It supports non-deterministic programming through backtracking and pattern matching through unification.

Filter by
Sorted by
Tagged with
7
votes
2answers
517 views

Higher-order Prolog predicates combine/3 and reduce/3

I'm trying to find useful versatile meta-predicates that are different from the vanilla ones offered currently by library(apply). How about the following two: <...
4
votes
1answer
233 views

map + foldl = mapfoldl

I was wondering... In the standard library of some Prolog systems, there are meta-predicates like maplist and foldl. In general,...
2
votes
1answer
294 views

Echo in prolog with single print

In order to learn a bit more of Prolog, I implemented the echo command for SWI-Prolog. I want a correct implementation, that is, it satisfies the following ...