aboutsummaryrefslogtreecommitdiff
path: root/make/core.mk
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-15 01:24:43 -0500
committerJoel Martin <github@martintribe.org>2014-04-15 01:24:43 -0500
commit7e9a2883fe5c25a521b1dc37e4c549e1ed508ece (patch)
treeb444224dae6db978d4b5902f2a5b37046ba40d3e /make/core.mk
parenta2849f89e7892feee256169398b1d2d82a2b8231 (diff)
downloadmal-7e9a2883fe5c25a521b1dc37e4c549e1ed508ece.tar.gz
mal-7e9a2883fe5c25a521b1dc37e4c549e1ed508ece.zip
All: fix get. All pass stepA tests.
Diffstat (limited to 'make/core.mk')
-rw-r--r--make/core.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/make/core.mk b/make/core.mk
index aaba3fd..fbea5ea 100644
--- a/make/core.mk
+++ b/make/core.mk
@@ -102,9 +102,11 @@ vals = $(foreach new_list,$(call _list),$(new_list)$(eval $(new_list)_value := $
# retrieve the value of a string key object from the hash map, or
# retrive a vector by number object index
get = $(strip \
- $(if $(call _hash_map?,$(word 1,$(1))),\
- $(call _get,$(word 1,$(1)),$(call str_decode,$($(word 2,$(1))_value))),\
- $(call _get,$(word 1,$(1)),$(call int_decode,$($(word 2,$(1))_value)))))
+ $(if $(call _nil?,$(word 1,$(1))),\
+ $(__nil),\
+ $(if $(call _hash_map?,$(word 1,$(1))),\
+ $(call _get,$(word 1,$(1)),$(call str_decode,$($(word 2,$(1))_value))),\
+ $(call _get,$(word 1,$(1)),$(call int_decode,$($(word 2,$(1))_value))))))
contains? = $(if $(call _contains?,$(word 1,$(1)),$(call str_decode,$($(word 2,$(1))_value))),$(__true),$(__false))