giancarloantonucci / ArrowMacros.jl

A Julia package providing the macros @↓ and @↑.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ArrowMacros.jl

A Julia package providing the macros @↓ and @↑.

Documentation Build Status Coverage Status

Installation

ArrowMacros is a registered package compatible with Julia v1.0 and above. From the Julia REPL,

]add ArrowMacros

Usage

@↓ and @↑ provide ExtractMacro.jl-like features with UnPack.jl-like syntax and speed. For example,

using ArrowMacros
mutable struct A; a; b; c; end
mutable struct B; d; e; end
s = A(1, [2, 3], B(4, [5, 6]))

@ a, b  b .- a = s
# (a, b) == (1, [1, 2])

a += 1
@ s = a, b  (@. 2b - 1)
# (s.a, s.b) == (2, [1, 3])

Read the documentation for a complete overview of this package.

About

A Julia package providing the macros @↓ and @↑.

License:GNU General Public License v3.0


Languages

Language:Julia 100.0%