StructWalk.jl icon indicating copy to clipboard operation
StructWalk.jl copied to clipboard

zipped iteration should splat

Open CarloLucibello opened this issue 1 year ago • 0 comments

Currently we have

StructWalk.scan(model, grad) do tupl
    x, g = tupl
    # ...
end

while I think it would be more idiomatic to pass separate arguments instead of a tuple

StructWalk.scan(model, grad) do x, g
    # ...
end

Of course this would be a breaking change, but it would match the semantics of map etc...

CarloLucibello avatar Apr 12 '23 03:04 CarloLucibello