# Exercise: Reading an Argument
#
# `args.at` retrieves a single argument by index:
#
#   args.at  ( Int -- String )
#
# What happens if the index is out of range? `args.at` returns the
# *empty string*, not a panic. That makes it forgiving but a little
# ambiguous — you can't immediately tell "argument not provided"
# apart from "argument was an empty string". For most CLI tools
# that distinction doesn't matter; when it does, you bounds-check
# with `args.count` first (next exercise).
#
# Your task: Write `arg-empty?` — given an index, return true if
# the argument at that index is the empty string (either because
# it really is empty *or* because it's out of bounds).
#
# Use `string.empty?` from chapter 13 to make the test.
#
# The test below only verifies your word runs. To actually see
# the missing-vs-empty ambiguity, drop your code into a shebang
# script:
#
#   #!/usr/bin/env seqc
#   : arg-empty? ( Int -- Bool )
#       args.at string.empty?
#   ;
#   : main ( -- Int )
#       1 arg-empty?
#       [ "arg 1 missing or empty" ]
#       [ "arg 1 present"          ]
#       if io.write-line
#       0
#   ;
#
#   $ chmod +x try-at.seq
#   $ ./try-at.seq                 → arg 1 missing or empty
#   $ ./try-at.seq hello           → arg 1 present
#   $ ./try-at.seq ""              → arg 1 missing or empty
#
# Notice the third case — an explicit empty string looks identical
# to a missing argument. The next exercise's bounds-check fixes
# that.
#
# When done, delete the marker line below.

# I AM NOT DONE

: arg-empty? ( Int -- Bool )
    # Your code here
    drop true
;

: test-runs ( -- )
    0 arg-empty? drop
    # Do not edit below this line
    true test.assert
;
