Icon+Unicon/Intro: Difference between revisions

m
Line 204:
(i < j) < k # shows more clearly how this works. Note if i < j fails the expression fails and nothing further is evaluated</lang>
 
===Prelude about Goal-Directed Evaluation and Generators ===
 
A central feature of Icon and Unicon is what is known as Goal-Directed Evaluation, and the intimately related concept of Generators. Briefly the idea is that expressions can yield more than one result (Generators) and if a further part of the expression results in failure, the earlier Generators will be driven to yield more results. These features implement [[:Category:Programming_paradigm/Logic_Programming|Logic Programming]] paradigms not unlike the backtracking found in Prolog or Regular Expressions. These features are built into the very core of the language. Prolog programmers will find it very familiar but of course with differences because Icon and Unicon do not use the functional language pattern matching technique of Prolog.
Anonymous user