File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 4
4
[ ![ codecov] ( https://codecov.io/gh/Tortar/HybridStructs.jl/graph/badge.svg?token=F8W0MC53Z0 )] ( https://codecov.io/gh/Tortar/HybridStructs.jl )
5
5
6
6
This package provides a simple way to create both mutable and immutable versions
7
- of a struct from a single definition. This can be particularly useful when you want to switch between
8
- mutable and immutable implementations without adding redundant code to define each version.
7
+ of a struct from a single definition. This can be particularly useful when you want
8
+ to switch between mutable and immutable implementations without adding redundant code
9
+ to define each version.
9
10
10
11
## Usage
11
12
@@ -29,10 +30,10 @@ It is then possible to create instances of the specified version:
29
30
30
31
``` julia
31
32
julia> s1 = S (1 , 2 , 3.0 ; mutable= true )
32
- S_Mut {Int} (1 , 2 , 3 )
33
+ S_Mut {Int} (1 , 2 , 3.0 )
33
34
34
35
julia> s2 = S (1 , 2 , 3.0 ; mutable= false )
35
- S_Immut {Int} (1 , 2.0 , 3 )
36
+ S_Immut {Int} (1 , 2.0 , 3.0 )
36
37
```
37
38
38
39
For ease of use it is also possible to use a macro to mutate both versions
@@ -57,4 +58,4 @@ Importantly, there are some catches to keep in mind:
57
58
58
59
## Contributing
59
60
60
- Contributions to HybridStructs.jl are welcome! Please feel free to submit issues, pull requests, or suggestions to improve the package.
61
+ Contributions are welcome! Please feel free to submit issues, pull requests, or suggestions to improve the package.
You can’t perform that action at this time.
0 commit comments