Skip to content

Commit

Permalink
fixed typo in queens example
Browse files Browse the repository at this point in the history
  • Loading branch information
davidssmith committed Nov 18, 2013
1 parent a11f193 commit eea786b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/queens.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addqueen(queens::Array{Vector{Int}}, queen::Vector{Int}) = push(copy(queens), queen)
addqueen(queens::Array{Vector{Int}}, queen::Vector{Int}) = push!(copy(queens), queen)

hitsany(queen::Vector{Int}, queens::Array{Vector{Int}}) = any(map((x) -> hits(queen, x), queens))
hits(a::Array{Int}, b::Array{Int}) = any(a .== b) || abs(a-b)[1] == abs(a-b)[2]
Expand Down

0 comments on commit eea786b

Please sign in to comment.