Skip to content

Confusion on Listing 7.27 #370

Discussion options

You must be logged in to vote

@joelf1403 Thank you for pointing this out!

You’re absolutely right—the tuple contains only two elements, and the variable fileName serves as a constant integer, used as an index to access the second element from the args array in the encrypt command case. It isn’t assigned any value from the tuple.

To address this issue, we’ve updated the sentence to be as follows:

In addition, Listing 7.27 retrieves the filename from the second item in args if the match expression evaluates to true.

This revised content will be reflected on our website in the coming days. If you have any further feedback or questions, feel free to reach out. We appreciate your engagement with our material! 😊

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BenjaminMichaelis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants