Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.05 KB

README.md

File metadata and controls

33 lines (22 loc) · 1.05 KB

EponymTuples

Lifecycle Build Status Coverage Status codecov.io

Julia package for deconstructing dispatch on NamedTuples.

Uses the variable names both for the NamedTuple and deconstruction.

Allows replacing

f((a, b)::NamedTuple{(:a, :b), <: Tuple{Any, Int}}) = ...

(a = a, b = b, c = 3)

with

f(@eponymargs(a, b::Int)) = ...

@eponymtuple(a, b, c = 3)

It is pretty lightweight: @eponymargs and @eponymtuple are the only symbols exported; and the package has no dependencies.

The package is registered, install with

pkg> add EponymTuples