Skip to content

Instantly share code, notes, and snippets.

@joubertnel
Created November 8, 2020 19:13
Show Gist options
  • Select an option

  • Save joubertnel/a39e35c83cb7600c5a04123fc59bcb46 to your computer and use it in GitHub Desktop.

Select an option

Save joubertnel/a39e35c83cb7600c5a04123fc59bcb46 to your computer and use it in GitHub Desktop.

Revisions

  1. joubertnel created this gist Nov 8, 2020.
    7 changes: 7 additions & 0 deletions example_keyword_varargs.jl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # 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/