[GHC] #10128: Data.List.transpose needs more docs

#10128: Data.List.transpose needs more docs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: ekmett Type: bug | Status: new Priority: normal | Milestone: Component: Core | Version: 7.8.4 Libraries | Operating System: Unknown/Multiple Keywords: | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- as mentioned by Doug McIlroy on haskell-prime. My preference in the interest of brevity would be to not include the equations that Doug mentioned and simply add his nicely constructed educating example to the docs:
The transpose function transposes the rows and columns of its argument. For example,
{{{ transpose [[1,2,3],[4,5,6]] == [[1,4],[2,5],[3,6]] }}}
If some of the rows are shorter than the following rows, their elements are skipped:
{{{ transpose [[10,11],[20],[],[30,31,32]] == [[10,20,30],[11,31],[32]] }}}
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10128 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10128: Data.List.transpose needs more docs
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: ekmett
Type: bug | Status: new
Priority: normal | Milestone:
Component: Core Libraries | Version: 7.8.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#10128: Data.List.transpose needs more docs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: ekmett Type: bug | Status: closed Priority: normal | Milestone: Component: Core Libraries | Version: 7.8.4 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by nomeata): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10128#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10128: Data.List.transpose needs more docs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: ekmett Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: 7.8.4 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thoughtpolice): * milestone: => 7.10.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10128#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC