You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this function can be useful generate :: Int -> (Int -> a) -> Array a
It builds an array of the given length by applying the function to each index.
I use it in many projects.
I can create a PR if necessary.
The text was updated successfully, but these errors were encountered:
I think I just map over a range when I've needed something like this in the past - that's slightly less efficient than it could be, but it's pretty much just the cost of one array allocation.
I think this function can be useful
generate :: Int -> (Int -> a) -> Array a
It builds an array of the given length by applying the function to each index.
I use it in many projects.
I can create a PR if necessary.
The text was updated successfully, but these errors were encountered: