Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed Chapter 2 #545

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4b14396
completed Task 1
yebowhatsay Oct 14, 2022
25952b6
completed Task 4
yebowhatsay Oct 14, 2022
fda7f4f
completed Task 6
yebowhatsay Oct 14, 2022
49e35f0
completed tasks in Chapter 1
yebowhatsay Oct 14, 2022
87ddeee
fixed a few bugs
yebowhatsay Oct 14, 2022
6a513c5
fixed firstDigit negative num bug
yebowhatsay Oct 14, 2022
0e79911
fixed redundant brackets
yebowhatsay Oct 14, 2022
bbee129
removed incorrect, commented closestToZero
yebowhatsay Oct 14, 2022
07b9b42
using divMod for sumLast2
yebowhatsay Oct 14, 2022
8cc6ed5
tests pass in Chapter1
yebowhatsay Oct 15, 2022
5e61213
added ghcup-list to Makefile
yebowhatsay Oct 15, 2022
48cb30c
improved mid function
yebowhatsay Oct 15, 2022
11833e1
completed Task1
yebowhatsay Oct 15, 2022
e831b30
extended tests for Chapter1 pass
yebowhatsay Oct 15, 2022
50594e5
completed Task 3:Chapter2
yebowhatsay Oct 16, 2022
7540e0d
completed Task 4:Chapter2
yebowhatsay Oct 16, 2022
c8c8147
completed Task 5:Chapter2
yebowhatsay Oct 16, 2022
b3671e6
completed Task 6:Chapter2
yebowhatsay Oct 16, 2022
13b9694
completed Task 7:Chapter2
yebowhatsay Oct 16, 2022
1c61d62
completed Task 8:Chapter2
yebowhatsay Oct 16, 2022
6f7b0b2
completed Task 9:Chapter2
yebowhatsay Oct 16, 2022
7f7ea4d
completed Task 10:Chapter2
yebowhatsay Oct 16, 2022
6cba85f
completed Task 11:Chapter2
yebowhatsay Oct 16, 2022
d7363c5
completed Task 12:Chapter2
yebowhatsay Oct 16, 2022
da81cae
Chapter2: all tests pass!
yebowhatsay Oct 16, 2022
03720de
completed Task1: Chapter3
Oct 17, 2022
ed6bb58
wrote the monster, knight game. woohoo
yebowhatsay Oct 17, 2022
c402998
changed knight win proclamation
yebowhatsay Oct 17, 2022
d2ec197
minor comments, Chapter 3
Oct 18, 2022
e7e9442
completed Task 3, Chapter 3
Oct 18, 2022
f4a76f1
completed Task 5: Chapter 3
yebowhatsay Oct 18, 2022
96bae81
completed Task 6: Chapter 3
yebowhatsay Oct 18, 2022
9a7589c
completed Task 7 : Chapter 3
yebowhatsay Oct 20, 2022
8fea446
completed Task 8: Chapter 3
yebowhatsay Oct 23, 2022
1da351b
working on Task 9: Chapter 3
yebowhatsay Oct 23, 2022
0c4dffb
move loop working
Oct 25, 2022
a26c6b5
functioning Task9
Oct 25, 2022
85200a2
Completed Chapter 3
yebowhatsay Oct 25, 2022
2416836
completed Task2: Chapter 4
yebowhatsay Oct 25, 2022
d857b87
updated Task 9, Chapter 3
Oct 26, 2022
f60c32e
reached Monads!
yebowhatsay Oct 28, 2022
b5380f9
completed Task8: Chapter 4. tests passing
Oct 29, 2022
3d4d5e4
working on the last task
yebowhatsay Oct 29, 2022
e38d4f2
completed Chapter 4, all tests pass
yebowhatsay Oct 30, 2022
59ad927
added return to Monad
Oct 31, 2022
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
Prev Previous commit
Next Next commit
completed Task 5:Chapter2
  • Loading branch information
yebowhatsay committed Oct 16, 2022
commit c8c81471688232219d6bd4b5b1079adcb258512d
5 changes: 4 additions & 1 deletion src/Chapter2.hs
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ Now, if you are ready, bring it on!
-}

module Chapter2 where
import GHC.IO.Device (IODevice(isTerminal))

{-
=🛡= Imports
@@ -513,7 +514,9 @@ True
>>> isThird42 [42, 42, 0, 42]
False
-}
isThird42 = error "isThird42: Not implemented!"
isThird42 :: [Int] -> Bool
isThird42 (_:_:42:_) = True
isThird42 _ = False


{- |