Curry (programming language): Difference between revisions

Content deleted Content added
m linking
Line 48:
double x = x+x
 
The expression “{{Mono|double 1}}” is replaced by {{Mono|1+1}}. The latter can be replaced by {{Mono|2}} if we interpret the operator “{{Mono|+}}” to be defined by an infinite set of equations, e.g., {{Mono|1=1+1 = 2}}, {{Mono|1=1+2 = 3}}, etc. In a similar way, one can evaluate nested expressions (where the subexpressions to be replaced are quoted):
 
'double (1+2)' → '(1+2)'+(1+2) → 3+'(1+2)' → '3+3' → 6