Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions markdown/source_md/input-and-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,8 @@ palindrome
palindrome
```

Again, we get the same output as if we had run our program and put in the words ourselves at the standard input.
We just don't see the input that `palindromes.hs` because the input came from the file and not from us typing the words in.
Again, we get the same output as if we had run the program and typed the words ourselves at standard input.
The difference is that we dont see the input, because it was provided to `palindromes.hs` from a file rather than entered directly at the keyboard.

So now you probably see how lazy I/O works and how we can use it to our advantage.
You can just think in terms of what the output is supposed to be for some given input and write a function to do that transformation.
Expand Down Expand Up @@ -1275,9 +1275,9 @@ Here's a small program that demonstrates how these two work:

```{.haskell:hs}
import System.Environment
import Data.List
import Data.List

main = do
main = do
args <- getArgs
progName <- getProgName
putStrLn "The arguments are:"
Expand Down