Personal tools

Separating shape and content

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Add page on separating shape and content in data structures)
 
(wibble)
 
(One intermediate revision by one user not shown)
Line 8: Line 8:
 
Ross Paterson has [http://www.haskell.org/pipermail/haskell-cafe/2006-September/018204.html written a nice overview] of the technique.
 
Ross Paterson has [http://www.haskell.org/pipermail/haskell-cafe/2006-September/018204.html written a nice overview] of the technique.
   
[[Category:Idioms]
+
[[Category:Idioms]]

Latest revision as of 01:34, 18 September 2006

An interesting programming technique in Haskell is to encode a data structure as two separate structures, one defining the shape of the overall data, and the other defining the content.

This is used, for one, in nested data parallelism, to distribute nested arrays as flat arrays + a shape descriptor across a network.

Ross Paterson has written a nice overview of the technique.