Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README.md for Options #202

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions exercises/options/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Options

Type Option represents an optional value: every Option is either Some and contains a value, or None, and does not.
Option types are very common in Cairo code, as they have a number of uses:
The **`Option`** type represents an optional value: every **`Option`** is either **`Some`** and contains a value, or **`None`**, and does not contain a value. **`Option`** types are very common in Cairo code because they serve a variety of purposes:

- Initial values
- Return values for functions that are not defined over their entire input range (partial functions)
- Return value for otherwise reporting simple errors, where None is returned on error
- Return values for functions that report simple errors, where **`None`** is returned in case of an error
- Optional struct fields
- Optional function arguments

Expand Down
Loading