Skip to content

Commit f2ecae7

Browse files
committed
add note of beta reduction
1 parent 01627f1 commit f2ecae7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lambda.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ function apply($f, $x)
7373
// evaluate the body of the function
7474
// by substituting the argument via
7575
// the environment
76+
//
77+
// this is also known as beta reduction
7678
list($_, $arg, $body, $env) = $f;
7779
return evaluate($body, array_merge($env, [$arg => $x]));
7880
}

0 commit comments

Comments
 (0)