aboutsummaryrefslogtreecommitdiff
path: root/go/src/types/types.go
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-10-04 22:35:08 -0500
committerJoel Martin <github@martintribe.org>2014-10-04 22:35:08 -0500
commit5caa8fb7e0bc5ebe1c2ec2df7b0ae1cc4ceeff8d (patch)
treef03bd9ec276c9b4aa79fdf17fdff0797be70b6bc /go/src/types/types.go
parentfcbda8d58a22c734c1c9020287cbe1df795d76c0 (diff)
downloadmal-5caa8fb7e0bc5ebe1c2ec2df7b0ae1cc4ceeff8d.tar.gz
mal-5caa8fb7e0bc5ebe1c2ec2df7b0ae1cc4ceeff8d.zip
go: step2_eval basic functionality
Diffstat (limited to 'go/src/types/types.go')
-rw-r--r--go/src/types/types.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/go/src/types/types.go b/go/src/types/types.go
index a212725..e3d8163 100644
--- a/go/src/types/types.go
+++ b/go/src/types/types.go
@@ -19,3 +19,18 @@ type Vector struct {
Val []MalType
}
+// Symbols
+func Symbol_Q(obj MalType) bool {
+ switch obj.(type) {
+ case Symbol: return true
+ default: return false
+ }
+}
+
+// Lists
+func List_Q(obj MalType) bool {
+ switch obj.(type) {
+ case List: return true
+ default: return false
+ }
+}