-
Notifications
You must be signed in to change notification settings - Fork 21
Rewrite broadcast() and map() based on lift() #166
Changes from 1 commit
4233744
899ed75
23ec9f2
2953516
82d9fde
cc787d9
0d649dd
6518c47
a69bd5f
a1926c7
0eab4dc
0a00622
615d084
75edfcb
2d8670d
5f10b07
83ea4cf
3f17571
5a88dab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ if VERSION < v"0.6.0-dev" # Old approach needed for inference to work | |
@inline ziptype(A, B, C, D...) = Zip{Tuple{eltype(A)}, ziptype(B, C, D...)} | ||
|
||
nullable_broadcast_eltype(f, As...) = | ||
_default_eltype(Base.Generator{ziptype(As...), ftype(f, As...)}) | ||
eltype(_default_eltype(Base.Generator{ziptype(As...), ftype(f, As...)})) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious why is this needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is "this"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's useful because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But, wouldn't that warrants that you don't get a Given that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I don't want There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem with this is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But that method is only called on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, now I see, this is |
||
else | ||
Base.@pure nullable_eltypestuple(a) = Tuple{eltype(eltype(a))} | ||
Base.@pure nullable_eltypestuple(T::Type) = Tuple{Type{eltype(T)}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise here, the changes in JuliaLang/julia#19421 might be relevant. Best!