Skip to content

Typo in Files and Streams #104

@jaye311

Description

@jaye311

Is your content edit request related to a problem? Please describe.
I think there is a typo in describing piping to output when it should be piping to input.
"We pipe the contents of shortlines.txt into the output of shortlinesonly and as the output, we only get the short lines.

This pattern of getting some string from the input, transforming it with a function and then outputting that is so common that there exists a function which makes that even easier, called interact. interact takes a function of type String -> String as a parameter and returns an I/O action that will take some input, run that function on it and then print out the function's result. Let's modify our program to use that.

"
Describe the solution you'd like
A typo correction would be nice if this was a typo.

Describe alternatives you've considered
Maybe it's not a typo?

Additional context
Image

Link to the page in question
https://learnyouahaskell.github.io/input-and-output.html#files-and-streams

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew content or edit request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions