Created
November 8, 2020 19:13
-
-
Save joubertnel/a39e35c83cb7600c5a04123fc59bcb46 to your computer and use it in GitHub Desktop.
Julia keyword varargs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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