Skip to content

JuliaFolds2/Referenceables.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Referenceables

Stable Dev Build Status Codecov Coveralls

Referenceables.jl provides an interface for readable and writable reference to an element of an array or dictionary. The entry point function is referenceable. Wrapping a container x yields a new view y = referenceable(x) to x where indexing to it yields a reference r = y[i]. This reference can be used to read value = r[] or write r[] = value a value.

Examples

julia> using Referenceables

julia> x = collect(reshape(1:6, (2, 3)))
       y = referenceable(x);

julia> r = y[1, 1] :: Ref
1

julia> r[] = 100;

julia> x
2×3 Array{Int64,2}:
 100  3  5
   2  4  6

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages