Skip to content

Commit

Permalink
[kowainik#41] Add newlines to fix doctest for the second chapter (kow…
Browse files Browse the repository at this point in the history
  • Loading branch information
chshersh authored Oct 1, 2020
1 parent 8ee2970 commit eced494
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Starting to learn Haskell with Learn4Haskell is very easy!

1. [Fork this repository](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo).
2. Enable GitHub Actions for your fork repository.
* Visit: https://github.com/<YOUR_GITHUB_USERNAME>/learn4haskell/actions
3. [Install the Haskell compiler](#installing-haskell).
4. Open the `src/Chapter1.hs` file, and start learning and solving tasks!
5. After you finish the first chapter (or any other chapter, or even if you are
Expand Down
9 changes: 9 additions & 0 deletions src/Chapter2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -137,30 +137,39 @@ functions in GHCi and insert the corresponding resulting output below:
List of booleans:
>>> :t [True, False]
String is a list of characters:
>>> :t "some string"
Empty list:
>>> :t []
Append two lists:
>>> :t (++)
Prepend an element at the beginning of a list:
>>> :t (:)
Reverse a list:
>>> :t reverse
Take first N elements of a list:
>>> :t take
Create list from N same elements:
>>> :t replicate
Split a string by line breaks:
>>> :t lines
Join a list of strings with line breaks:
>>> :t unlines
Expand Down

0 comments on commit eced494

Please sign in to comment.