# Exercise: Safe File Reading
#
# `file.slurp-safe` reads a file and returns a status flag.
#
# Stack effect: ( path -- contents status )
#
# The status is:
#   - 1 (true) if the read succeeded
#   - 0 (false) if the file doesn't exist or can't be read
#
# Example:
#   "data.txt" file.slurp-safe [
#       # Got contents, use them
#   ] [
#       drop  # Drop empty string
#       # Handle error
#   ] if
#
# Your task: Understand safe file reading
# When done, delete the marker line below.

# I AM NOT DONE

: returns-status? ( -- Int )
    # file.slurp-safe returns two values. Does it return a status flag?
    # Return 1 for yes, 0 for no
    0
;

: test-safe-read ( -- )
    returns-status?
    # Do not edit below this line
    1 test.assert-eq
;
