From 0f64d24074a0582a8d519aab07b2cae616c48172 Mon Sep 17 00:00:00 2001 From: Pekka Laiho Date: Wed, 3 Jun 2020 18:25:16 +0700 Subject: [PATCH] add func for convert to symbol --- src/Lib/Types.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Lib/Types.php b/src/Lib/Types.php index e41d601..02b04fc 100644 --- a/src/Lib/Types.php +++ b/src/Lib/Types.php @@ -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,