add not function

This commit is contained in:
Pekka Laiho 2020-06-04 17:51:01 +07:00
parent 8ec2ad4596
commit 463025d43d

View File

@ -36,6 +36,10 @@ class Types implements ILib
fn (string $a) => new Symbol($a)
));
$env->set('not', new CoreFunc('not', 'Turns true to false and vice versa.', 1, 1,
fn ($a) => !$a
));
// Test types
$env->set('type', new CoreFunc('type', 'Return the type of argument as a string.', 1, 1,