update for functors.jl change

This commit is contained in:
Mike J Innes 2020-04-14 15:21:45 +01:00
parent 6eda279190
commit a35335db00
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ end
@forward Chain.layers Base.getindex, Base.length, Base.first, Base.last,
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(fs::Tuple, x) = applychain(tail(fs), first(fs)(x))