Skip to content

Instantly share code, notes, and snippets.

@joubertnel
Created November 8, 2020 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joubertnel/a39e35c83cb7600c5a04123fc59bcb46 to your computer and use it in GitHub Desktop.
Save joubertnel/a39e35c83cb7600c5a04123fc59bcb46 to your computer and use it in GitHub Desktop.
Julia keyword varargs
# define a function, g, which takes an arbitrary number of keyword arguments and
# prints the keys and values of the arguments passed to it.
g(;kwargs...) = (println ∘ collect)(kwargs)
# for more about varargs, optional arguments, and keyword arguments in Julia
# see https://docs.julialang.org/en/v1/manual/functions/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment