update for functors.jl change
This commit is contained in:
parent
6eda279190
commit
a35335db00
|
@ -30,7 +30,7 @@ end
|
||||||
@forward Chain.layers Base.getindex, Base.length, Base.first, Base.last,
|
@forward Chain.layers Base.getindex, Base.length, Base.first, Base.last,
|
||||||
Base.iterate, Base.lastindex
|
Base.iterate, Base.lastindex
|
||||||
|
|
||||||
functor(c::Chain) = c.layers, ls -> Chain(ls...)
|
functor(::Type{<:Chain}, c) = c.layers, ls -> Chain(ls...)
|
||||||
|
|
||||||
applychain(::Tuple{}, x) = x
|
applychain(::Tuple{}, x) = x
|
||||||
applychain(fs::Tuple, x) = applychain(tail(fs), first(fs)(x))
|
applychain(fs::Tuple, x) = applychain(tail(fs), first(fs)(x))
|
||||||
|
|
Loading…
Reference in New Issue