Content deleted Content added
m linking |
Citation bot (talk | contribs) m Add: isbn, volume. Removed URL that duplicated unique identifier. | You can use this bot yourself. Report bugs here.| Activated by User:Nemo bis | via #UCB_webform |
||
Line 35:
| publisher = ACM
| year = 2010
| doi = 10.1145/1721654.1721675
}}</ref> based on the [[Haskell (programming language)|Haskell]] language. It merges elements of functional and logic programming, including [[constraint programming]] integration.
Line 105 ⟶ 104:
| publisher = ACM
| year = 2007
| issn = 0004-5411
| doi = 10.1145/347476.347484
Line 116 ⟶ 114:
last (ys++[e]) = e
</source>
Haskell does not allow such a declaration since the pattern in the left-hand side contains a defined function ({{Mono|++}}). Such a pattern is also called ''functional pattern''.<ref>{{cite journal|doi=10.1007/11680093_2 | title=Declarative Programming with Function Patterns | year=2006 | journal=Lecture Notes in Computer Science | volume=3901 | pages=6–22 | author=Antoy Sergio, Hanus Michael| isbn=978-3-540-32654-0 }}</ref> Functional patterns are enabled by the combined functional and logic features of Curry and support concise definitions of tasks requiring deep pattern matching in hierarchical data structures.
===Non-determinism===
Line 125 ⟶ 123:
x ? y = y
Thus, the evaluation of the expression {{Mono|0 ? 1}} returns {{Mono|0}} as well as {{Mono|1}}. Computing with non-deterministic operations and computing with free variables by narrowing has the same expressive power.<ref>{{cite journal|doi=10.1007/11799573_9 | title=Overlapping Rules and Logic Variables in Functional Logic Programs | year=2006 | journal=Lecture Notes in Computer Science | volume=4079 | pages=87–101 | author=Antoy Sergio, Hanus Michael| isbn=978-3-540-36635-5 }}</ref>
The rules defining {{Mono|?}} show an important feature of Curry: all rules are tried in order to evaluate some operation. Hence, one can define by
|