use feature qw(switch);
use Exporter 'import';
our @EXPORT_OK = qw(_sequential_Q _equal_Q _clone
- $nil $true $false
- _symbol_Q _nil_Q _true_Q _false_Q _list_Q _vector_Q
- _hash_map _hash_map_Q _assoc_BANG _dissoc_BANG
- _atom_Q);
+ $nil $true $false _nil_Q _true_Q _false_Q
+ _symbol _symbol_Q _keyword _keyword_Q _list_Q _vector_Q
+ _hash_map _hash_map_Q _assoc_BANG _dissoc_BANG _atom_Q);
use Data::Dumper;
package Symbol;
sub new { my $class = shift; bless \$_[0] => $class }
}
-
sub _symbol_Q { (ref $_[0]) =~ /^Symbol/ }
+sub _keyword { return String->new(("\x{029e}".$_[0])); }
+sub _keyword_Q { ((ref $_[0]) =~ /^String/) && ${$_[0]} =~ /^\x{029e}/; }
+
+
{
package String;
sub new { my $class = shift; bless \$_[0] => $class }