diff options
| author | Joel Martin <github@martintribe.org> | 2014-10-04 23:16:19 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-10-04 23:16:19 -0500 |
| commit | 8b8afefc458810da516272d679b5a9de1f0daa17 (patch) | |
| tree | b2d9fd4e4863c61230df31e592f5f6e35325b837 /go/src/types | |
| parent | 5caa8fb7e0bc5ebe1c2ec2df7b0ae1cc4ceeff8d (diff) | |
| download | mal-8b8afefc458810da516272d679b5a9de1f0daa17.tar.gz mal-8b8afefc458810da516272d679b5a9de1f0daa17.zip | |
go: step2_eval vector/hash-map in eval_ast
Diffstat (limited to 'go/src/types')
| -rw-r--r-- | go/src/types/types.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/go/src/types/types.go b/go/src/types/types.go index e3d8163..9fcc78c 100644 --- a/go/src/types/types.go +++ b/go/src/types/types.go @@ -34,3 +34,19 @@ func List_Q(obj MalType) bool { default: return false } } + +// Vectors +func Vector_Q(obj MalType) bool { + switch obj.(type) { + case Vector: return true + default: return false + } +} + +// Hash Maps +func Hash_Map_Q(obj MalType) bool { + switch obj.(type) { + case map[string]MalType: return true + default: return false + } +} |
