Re: [Haskell-cafe] Naturality condition for inits

2009-03-08 Thread J.N. Oliveira
R J wrote: Here's another Bird problem that's stymied me: The function inits computes the list of initial segments of a list; its type is inits :: [a] - [[a]]. What is the appropriate naturality condition for inits? Just use the free theorem associated to type [a] - [[a]] in Janis

[Haskell-cafe] Naturality condition for inits

2009-03-07 Thread R J
Here's another Bird problem that's stymied me: The function inits computes the list of initial segments of a list; its type is inits :: [a] - [[a]]. What is the appropriate naturality condition for inits? The only discussion in the text concerning naturality conditions concerns map, where

Re: [Haskell-cafe] Naturality condition for inits

2009-03-07 Thread Derek Elkins
On Sat, 2009-03-07 at 22:18 +, R J wrote: Here's another Bird problem that's stymied me: The function inits computes the list of initial segments of a list; its type is inits :: [a] - [[a]]. What is the appropriate naturality condition for inits? A natural transformation is between two

Re: [Haskell-cafe] Naturality condition for inits

2009-03-07 Thread Daniel Fischer
Am Samstag, 7. März 2009 23:18 schrieb R J: Here's another Bird problem that's stymied me: The function inits computes the list of initial segments of a list; its type is inits :: [a] - [[a]]. What is the appropriate naturality condition for inits? The only discussion in the text