[GHC] #10128: Data.List.transpose needs more docs
GHC
ghc-devs at haskell.org
Mon Mar 2 09:44:29 UTC 2015
#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
More information about the ghc-tickets
mailing list