Functional Groningen, 2014-05-08
→ programs are very readable
What makes Prolog systems small? Complex question, but we can identify various factors. With backtracking instead of control structures, Prolog eliminates the 90% of loops that are actually iterators. Backtracking often eliminates error handling. Partial binding and incomplete structures eliminate much data reformatting. And in general, there's just a lot more case based reasoning, which means a lot less ceremony associated with handling of edge conditions.
findall/3
, member/2
)forall/2
)var/1
)aggregate/4
for processing all solutions
Photo courtesy of Adam Arroyo, CC BY-NC-ND 2.0