Skip to content

Commit

Permalink
This should be the work. (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamDue authored Aug 3, 2023
1 parent ee56f96 commit 0257963
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prelude/array.fut
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ def tabulate 'a (n: i64) (f: i64 -> a): *[n]a =

-- | Create a value for each point in a two-dimensional index space.
--
-- **Work:** *O(n ✕ W(f))*
-- **Work:** *O(n ✕ m ✕ W(f))*
--
-- **Span:** *O(S(f))*
def tabulate_2d 'a (n: i64) (m: i64) (f: i64 -> i64 -> a): *[n][m]a =
map1 (f >-> tabulate m) (iota n)

-- | Create a value for each point in a three-dimensional index space.
--
-- **Work:** *O(n ✕ W(f))*
-- **Work:** *O(n ✕ m ✕ o ✕ W(f))*
--
-- **Span:** *O(S(f))*
def tabulate_3d 'a (n: i64) (m: i64) (o: i64) (f: i64 -> i64 -> i64 -> a): *[n][m][o]a =
Expand Down

0 comments on commit 0257963

Please sign in to comment.