aboutsummaryrefslogtreecommitdiff
path: root/php/step4_if_fn_do.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/step4_if_fn_do.php')
-rw-r--r--php/step4_if_fn_do.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/php/step4_if_fn_do.php b/php/step4_if_fn_do.php
index 25ca7c5..83734b1 100644
--- a/php/step4_if_fn_do.php
+++ b/php/step4_if_fn_do.php
@@ -90,11 +90,13 @@ function rep($str) {
global $repl_env;
return MAL_PRINT(MAL_EVAL(READ($str), $repl_env));
}
-function _ref($k, $v) { global $repl_env; $repl_env->set($k, $v); }
-// Import core functions
-foreach ($core_ns as $k=>$v) { _ref($k, $v); }
-// Defined using the language itself
+// core.php: defined using PHP
+foreach ($core_ns as $k=>$v) {
+ $repl_env->set($k, _function($v));
+}
+
+// core.mal: defined using the language itself
rep("(def! not (fn* (a) (if a false true)))");
do {