Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # immutable read function (read the property directly)
- function read($hash, $k) {
- $hash[$k]
- }
- # immutable write function (copy on write)
- function write($hash, $k, $v) {
- $newHash = $hash.Clone()
- $newHash[$k] = $v
- $newHash
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement