https://github.com/initdc/types.v
https://github.com/initdc/types.v
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/initdc/types.v
- Owner: initdc
- License: mpl-2.0
- Created: 2025-12-28T12:15:30.000Z (6 months ago)
- Default Branch: wip
- Last Pushed: 2025-12-28T17:16:57.000Z (6 months ago)
- Last Synced: 2025-12-30T23:30:47.943Z (6 months ago)
- Language: V
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# types.v
Bring the Rust [Result Option] types to Vlang
> V has [builtin Option/Result types](https://docs.vlang.io/type-declarations.html#optionresult-types-and-error-handling) supporting, so the project only purpose to learn [generics](https://docs.vlang.io/type-declarations.html#generics) of V.
## Usage
```v
a := some(0)
b := non[int]()
assert a.is_some() == true
assert b.is_some() == false
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/initdc/types.v