It reads from standard input so you either have to type some lines in and
hit Ctrl-D or pipe a file to standard input using the shell.
On May 19, 2014 4:17 PM, "Pierre R" <[email protected]> wrote:

>
>
> On Monday, May 12, 2014 4:27:37 AM UTC+2, Gabriel Gonzalez wrote:
>>
>>  Earlier today I wrote up a fold for somebody else for retrieving the
>> last N elements of a sequence.  That's the non-trivial bit:
>>
>> http://lpaste.net/103997<http://www.google.com/url?q=http%3A%2F%2Flpaste.net%2F103997&sa=D&sntz=1&usg=AFQjCNGn-hu-CTTeuqPcUTfgK2xhH7QjHg>
>>
>>
> I am almost ashamed to ask but I fail to see why the `main` (in the above
> lpaste) does not output a thing
>
> while it works as expected with a file
>
> main = withFile "test" ReadMode $ \hIn -> do
>         ls <- purely fold (lastN 5) $ P.fromHandle hIn
>         runEffect $ for (each ls) (lift . putStrLn)
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Haskell Pipes" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
>

-- 
You received this message because you are subscribed to the Google Groups 
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to