Skip to content

Instantly share code, notes, and snippets.

@davidagold
Created June 20, 2015 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidagold/145e0a0f41f6d1baa915 to your computer and use it in GitHub Desktop.
Save davidagold/145e0a0f41f6d1baa915 to your computer and use it in GitHub Desktop.
map
function Base.map!{F}(f::F,
dest::NullableArray,
A::AbstractArray) # -> NullableArray{T, N}
local func
function func(dest, A)
for i in 1:length(dest)
dest[i] = f(A[i])
end
end
func(dest, A)
dest
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment