Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function for materializing a container from its type #75

Merged
merged 2 commits into from
Nov 5, 2019
Merged

Conversation

tkf
Copy link
Member

@tkf tkf commented Nov 5, 2019

close #73

Possible APIs

  1. into(T, xf, foldable) (as implemented ATM)

    • or into(xf, T, foldable)?
  2. copy(xf, [T,] foldable):

    • copy(xf, T, foldable) = append!!(xf, Empty(T), foldable)
    • copy(xf, foldable) = copy(xf, constructorof(typeof(foldable)), foldable)
    • It makes sense as we already have copy!(xf, dest, src)?
  3. map(xf, [T,] foldable)

Upstream:

@codecov-io
Copy link

codecov-io commented Nov 5, 2019

Codecov Report

Merging #75 into master will decrease coverage by 0.28%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   84.17%   83.88%   -0.29%     
==========================================
  Files          17       17              
  Lines        1106     1111       +5     
==========================================
+ Hits          931      932       +1     
- Misses        175      179       +4
Impacted Files Coverage Δ
src/Transducers.jl 100% <ø> (ø) ⬆️
src/processes.jl 88.11% <0%> (-3.2%) ⬇️
src/core.jl 68.38% <0%> (-0.65%) ⬇️
src/library.jl 93.5% <0%> (+0.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4afe671...fb6973d. Read the comment docs.

@tkf tkf changed the title Add into(T, xf, foldable) Add a function for materializing a container given a type Nov 5, 2019
@tkf tkf changed the title Add a function for materializing a container given a type Add a function for materializing a container from its type Nov 5, 2019
@tkf tkf merged commit fb6973d into master Nov 5, 2019
@delete-merged-branch delete-merged-branch bot deleted the empty branch November 5, 2019 07:24
@non-Jedi
Copy link

non-Jedi commented Nov 5, 2019

Very cool. Does this make Transducers work with TypedTables as is by magic (I see you added a dependency on Tables.jl to BangBang), or does JuliaData/TypedTables.jl#55 have to be resolved first?

EDIT: Nevermind, I just saw JuliaFolds/BangBang.jl#29 where the support for TypedTables was added. Thanks so much for doing the work for interop. It's highly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypedTables.Table as a sink
3 participants