dashbitco / nimble_options

A tiny library for validating and documenting high-level options. 💽
Apache License 2.0
507 stars 38 forks source link

Unify mfargs and function types with the help of an apply function #2

Closed josevalim closed 3 years ago

whatyouhide commented 4 years ago

@josevalim can you expand on this a bit?

josevalim commented 4 years ago

Today we have both MFAs and functions types, I think it should be a single type and we have:

def apply({m, f, args}, extra), do: apply(m, f, extra ++ args)
def apply(fun, extra), do: apply(fun, extra)