# Exercise: Getting Values from Maps
#
# Use `map.get` to retrieve values by key.
#
# Stack effect:
#   map.get ( Map Key -- Value Bool )
#
# `map.get` returns BOTH the looked-up value AND a Bool that says
# whether the key was found. When you know the key exists, discard
# the Bool with `drop`. (You'll see the safer pattern in the next
# exercise.)
#
# Example:
#   my-map "name" map.get drop    # Stack: ( "Alice" )
#
# Your task: Get the value for each key, drop the success flag,
# and verify it matches the expected string.
#
# When done, delete the marker line below.

# I AM NOT DONE

: make-test-map ( -- Map )
    map.make
    "color" "blue" map.set
    "size" "large" map.set
;

: test-get ( -- )
    make-test-map
    # Get the value for "color" (and drop the Bool)
    # Your code here
    drop ""

    # Do not edit below this line
    "blue" string.equal? test.assert
;

: test-get-other ( -- )
    make-test-map
    # Get the value for "size" (and drop the Bool)
    # Your code here
    drop ""

    # Do not edit below this line
    "large" string.equal? test.assert
;
