+-- | The cubes_from_values function will return a function that takes
+-- a list of values and returns a list of cubes. It could just as
+-- well be written to take the values as a parameter; the omission
+-- of the last parameter is known as an eta reduce.
+cubes_from_values :: Grid -> Int -> Int -> ([Double] -> [Cube])
+cubes_from_values g i' j' =
+ zipWith (reverse_cube g i' j') [0..]
+
+-- | The cubes_from_planes function will return a function that takes
+-- a list of planes and returns a list of cubes. It could just as
+-- well be written to take the planes as a parameter; the omission
+-- of the last parameter is known as an eta reduce.
+cubes_from_planes :: Grid -> Int -> ([[Double]] -> [[Cube]])
+cubes_from_planes g i' =
+ zipWith (cubes_from_values g i') [0..]
+
+-- | Takes a grid as an argument, and returns a three-dimensional list
+-- of cubes centered on its grid points.