diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-16 23:57:50 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-16 23:57:50 -0500 |
| commit | 8cb5cda46cf3aef847ae3926dc53a5e5f87fe261 (patch) | |
| tree | 13e5b2878f19ee24272ead8a92a9cb84b33ad0e5 /php/step5_tco.php | |
| parent | a05f7822b10ed4cdd61ed8384299a003baf1c1c6 (diff) | |
| download | mal-8cb5cda46cf3aef847ae3926dc53a5e5f87fe261.tar.gz mal-8cb5cda46cf3aef847ae3926dc53a5e5f87fe261.zip | |
All: move some fns to core. Major cleanup.
- Don't import/require core until step4.
- Define cond/or macros from step8
Diffstat (limited to 'php/step5_tco.php')
| -rw-r--r-- | php/step5_tco.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/php/step5_tco.php b/php/step5_tco.php index cd4787e..31e2980 100644 --- a/php/step5_tco.php +++ b/php/step5_tco.php @@ -99,14 +99,13 @@ function rep($str) { global $repl_env; return MAL_PRINT(MAL_EVAL(READ($str), $repl_env)); } -function _ref($k, $v) { - global $repl_env; + +// core.php: defined using PHP +foreach ($core_ns as $k=>$v) { $repl_env->set($k, _function($v)); } -// Import core functions -foreach ($core_ns as $k=>$v) { _ref($k, $v); } -// Defined using the language itself +// core.mal: defined using the language itself rep("(def! not (fn* (a) (if a false true)))"); do { |
