Differences

This shows you the differences between two versions of the page.

Link to this comparison view

rl:bindings [2020/11/21 12:59] – created sprowellrl:bindings [2020/11/21 13:03] (current) sprowell
Line 5: Line 5:
     { bind $x -> 7, $y -> 21 }     { bind $x -> 7, $y -> 21 }
          
-This represents binding the variable `$x` to the value `7`, and the variable `$yto the value `21`.  A binding is *applicative*, meaning it can be applied to another term.  This results in the given substitutions being performed.+This represents binding the variable ''\$'' to the value ''7'', and the variable ''\$y'' to the value ''21''.  A binding is *applicative*, meaning it can be applied to another term.  This results in the given substitutions being performed.
  
 An important item to consider is that variables are matched on both name and type, but are *bound* by name only.  (This is done to make rewriting more efficient.)  This means that rewriting relies on the variable name alone; types and any guards are used only during matching. An important item to consider is that variables are matched on both name and type, but are *bound* by name only.  (This is done to make rewriting more efficient.)  This means that rewriting relies on the variable name alone; types and any guards are used only during matching.