Joy (programming language): Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile web edit
Line 28:
</syntaxhighlight>
 
The variable x is a formal parameter which is replaced by the actual valueargument to be squared when the function is called. In a [[functional programming|functional]] language ([[Scheme (programming language)|Scheme]]) the same function could be defined:
 
<syntaxhighlight lang="scheme">
Line 36:
</syntaxhighlight>
 
This is different in many ways, but it still uses the formal parameter x in the same way. In Joy the square function is defined:
 
DEFINE square == dup * .