| File | Date | Author | Commit |
|---|---|---|---|
| docs | 2025-10-23 |
|
[27c15f] Remove extraneous comment |
| .hgignore | 2025-09-01 |
|
[9faf7e] Updated README |
| .hgtags | 2025-10-23 |
|
[7575ec] Moved tag V0.16 to changeset 27c15f8d94b4 (from... |
| README.md | 2025-10-15 |
|
[7665a1] Added get() with default and a couple of minor ... |
| docgen.sh | 2025-09-01 |
|
[9faf7e] Updated README |
| docs.html | 2024-01-14 |
|
[b837fe] Enhanced operators '?' and '$' |
| quad_states.nim | 2025-10-23 |
|
[27c15f] Remove extraneous comment |
| quad_states.nimble | 2025-10-22 |
|
[b5689f] Added borrows to distinct types |
This is a utility function for development in the nim language.
This was originally intended to combine the functionality of Result[] and Option[] but has since been extended to give a more subtle mix of values.
As with Result and Option, the primary usage of these data values is to return state conditions from proc and func mostly
obviating the need to raise exceptions to return abnormal state conditions.
The various return data types are:
QOption:
Option and allows a value of nothing (None).QResult:
This is equivalent to Result and allows a return value or an error value to be returned.
QTResult:
QResult but the error value is restricted to being a string (text) value.QValid:
This allows a return type to indicate the process was valid (but had no need to actually return any data upon a valid completion), or it can return an error condition indication the nature of the failure within the process.
QTValid:
QValid but the error value is restricted to being a string (text) value.QValue
This combines QResult and QOption (i.e. it can return a value, and error, or neither.
QTValue:
QValue but the error value is restricted to being a string (text) value.The states returned are:
Value:
QOption or QResult or QValue.Error:
QResult or QValid or QValue.None:
QOption or QValue.Valid:
QValid.More details can be found in the code comments or the documentation that can be generated from those comments.
nimble install "http://hg.code.sf.net/p/nim-quad-states/code"