Created
November 20, 2019 03:08
-
-
Save LucianoPAlmeida/55b0e9c5aea514771290008d2ea6914f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct S1 { | |
private var _buffer: [UInt8] = [] | |
var values: [UInt8] { | |
get { _buffer } | |
_modify { | |
yield &_buffer | |
} | |
} | |
} | |
var s1 = S1() | |
s1.values.append(1) | |
s1.values.append(2) | |
print(s1.values) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment