Skip to content

Commit

Permalink
Merge pull request #87 from avik-pal/ap/empty_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
darsnack authored Jul 31, 2024
2 parents 2eddcb7 + 3c6b131 commit b597d47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Functors"
uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
authors = ["Mike J Innes <mike.j.innes@gmail.com>"]
version = "0.4.11"
version = "0.4.12"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
2 changes: 1 addition & 1 deletion src/walks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,6 @@ function (walk::FlattenWalk)(recurse, x, ys...)
x_children = _values(children(x))
ys_children = map(children, ys)
res = _map(recurse, x_children, ys_children...)
return reduce(vcat, _values(res))
return reduce(vcat, _values(res); init = [])
end

3 changes: 3 additions & 0 deletions test/basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,9 @@ end
@test xflat isa Vector
@test length(xflat) == 3
@test 1 xflat && 2 xflat && [1, 2, 3] xflat

@test fleaves((;)) == []
@test fleaves((; a = 1, b = 2, c = (;))) == [1, 2]
end

@testset "fmap_with_path" begin
Expand Down

2 comments on commit b597d47

@CarloLucibello
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/112183

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.12 -m "<description of version>" b597d472da445e2ecb2f84ac8863606ed7978953
git push origin v0.4.12

Please sign in to comment.