f(floor(x); args...) should work.
On Tue, Jul 21, 2015 at 10:14 AM, Linus Härenstam-Nielsen
linush...@gmail.com wrote:
I am looking for a way to automatically pass on all keyword arguments
through a function. Naively I would like to be able to do something like
this:
f(x::Int; y::Int=5,
This worked! Didn't realize you could use ; when calling functions.
On Tuesday, July 21, 2015 at 4:49:36 PM UTC+2, Stefan Karpinski wrote:
f(floor(x); args...) should work.
On Tue, Jul 21, 2015 at 10:14 AM, Linus Härenstam-Nielsen
linu...@gmail.com javascript: wrote:
I am looking for a
On Tue, Jul 21, 2015 at 10:48 AM, Stefan Karpinski ste...@karpinski.org wrote:
f(floor(x); args...) should work.
Relevant documentation is here[1] in case you have other confusions
about keyword arguments.
[1] http://julia.readthedocs.org/en/latest/manual/functions/#keyword-arguments
On Tue,
I am looking for a way to automatically pass on all keyword arguments
through a function. Naively I would like to be able to do something like
this:
f(x::Int; y::Int=5, z::Int=3) = x+y+z
f(x::Float64; args...) = f(floor(x), args...)
But that doesn't work currently (actually, it causes