Curry (programming language): Difference between revisions

Content deleted Content added
Basic Concepts: fix more Mono templates
Line 88:
last xs | ys++[e] =:= xs = e where ys,e free
</source>
Here, the symbol “{{Mono|1==:=}}” is used for equational constraints in order to provide a syntactic distinction from defining equations. Similarly, extra variables (i.e., variables not occurring in the left-hand side of the defining equation) are explicitly declared by “{{Mono|where...free}}” in order to provide some opportunities to detect bugs caused by typos. A conditional equation of the form l {{Mono||{{!}}}} c {{Mono|1==}} r is applicable for reduction if its condition c has been solved. In contrast to purely functional languages where conditions are only evaluated to a Boolean value, functional logic languages support the solving of conditions by guessing values for the unknowns in the condition. Narrowing as discussed in the next section is used to solve this kind of conditions.
 
===Narrowing===