diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-15 01:24:43 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-15 01:24:43 -0500 |
| commit | 7e9a2883fe5c25a521b1dc37e4c549e1ed508ece (patch) | |
| tree | b444224dae6db978d4b5902f2a5b37046ba40d3e /make/core.mk | |
| parent | a2849f89e7892feee256169398b1d2d82a2b8231 (diff) | |
| download | mal-7e9a2883fe5c25a521b1dc37e4c549e1ed508ece.tar.gz mal-7e9a2883fe5c25a521b1dc37e4c549e1ed508ece.zip | |
All: fix get. All pass stepA tests.
Diffstat (limited to 'make/core.mk')
| -rw-r--r-- | make/core.mk | 8 |
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)) |
