Skip to content

Commit

Permalink
forgot a Compat.findfirst
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinschmidt committed Apr 17, 2018
1 parent ff277c8 commit 0f88bfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formula.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ rewrite!(ex::Expr, child_idx::Int, ::Nothing) = child_idx+1
# like `findfirst` but returns the first element where predicate is true, or
# nothing
function filterfirst(f::Function, a::AbstractArray)
idx = findfirst(f, a)
idx = Compat.findfirst(f, a)
idx === nothing ? nothing : a[idx]
end

Expand Down

0 comments on commit 0f88bfa

Please sign in to comment.