Equivalent to matlab diff(x)

julia> x = [1, 1, 2, 3, 5, 8, 13, 21]
8-element Vector{Int64}:
  1
  1
  2
  3
  5
  8
 13
 21

julia> y = diff(x)
7-element Vector{Int64}:
 0
 1
 1
 2
 3
 5
 8
6 Likes