Skip to content

Julia package for deconstructing dispatch on NamedTuples.

License

Notifications You must be signed in to change notification settings

tpapp/EponymTuples.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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