add func for convert to symbol

This commit is contained in:
Pekka Laiho 2020-06-03 18:25:16 +07:00
parent 53730d16ef
commit 0f64d24074

View File

@ -32,6 +32,10 @@ class Types implements ILib
fn (...$args) => implode('', array_map('strval', $args))
));
$env->set('symbol', new CoreFunc('symbol', 'Convert argument to symbol.', 1, 1,
fn (string $a) => new Symbol($a)
));
// Test types
$env->set('type?', new CoreFunc('type?', 'Return the type of argument as a string.', 1, 1,