Added a simple add-function and two tests for it
Fixing final carry-value for sum function
Lagt til QuickCheck for textAdd
Generating number pairs for better testing
Add .hs, .hi og .o-filer to .gitignore
Refactoring in TextCalculator.hs
Removed unused code
finnished slides and exercises for two topics
created lessonB/Test.hs and a test for UpdateRecords
make exercises for UsginDataTypes and generate some test data
added a few unit tests to cover UsingDataTypes
merged and renamed
added separate executable for lesson b in the cabal file so we can run ./hands-on-haskell.cabal has been changed. Re-configuring with most recently
used options. If this fails, please run configure manually.
Resolving dependencies...
Configuring hands-on-haskell-2.0.0.0...
Preprocessing executable 'a' for hands-on-haskell-2.0.0.0...

GettingStarted.myName
  - returns your name FAILED [1]

Functions.multiply10by20
  - returns 200 FAILED [2]

Functions.plus
  - adds to *arbitrary* numbers FAILED [3]

Functions.sum3
  - adds three *arbitrary* numbers FAILED [4]

Functions.isDollar
  - returns true for '$' FAILED [5]
  - returns false for anything but '$' FAILED [6]

Functions.xor
  - is correct FAILED [7]

PatternMatching.secondElement
  - returns the second element from [12345] FAILED [8]

PatternMatching.drop3
  - drops the three first elements in [123456] FAILED [9]

PatternMatching.thirdAndLast
  - returns the third element in [123] FAILED [10]

Recursion.secondToLast
  - returns the second to last element in [1234] FAILED [11]

Recursion.listLength
  - returns the length of an *arbitrary* list FAILED [12]

RecursionSchemes.add1
  - adds 1 to all elements in an *arbitrary* list FAILED [13]

RecursionSchemes.numsAsStrings
  - converts all integers to strings FAILED [14]

RecursionSchemes.greaterThan2
  - returns integers greater than 2 FAILED [15]

RecursionSchemes.filterNot
  - keeps the elements that filter would remove for condition (< 2) FAILED [16]

Regex.find
  - 'sub' in 'substringsubstring' FAILED [17]
  - does not find '2312' in 'badabiiiing231'
  - 'su.' in 'oosubstr' FAILED [18]
  - '.i.of' in 'aa1i1ofs' FAILED [19]
  - 'su*' in 'papasuubstring' FAILED [20]
  - 'ab*' in 'abbbba' FAILED [21]
  - 'a*b' in 'accbaaabsdab' FAILED [22]
  - '92?3?' in '125s29242s' FAILED [23]

Project Euler - Problem 1
  - is correct FAILED [24]

HigherOrderFunctions.union
  - should return union FAILED [25]

QuickCheckExamples.encodeDecode
  - decode is inverse encode FAILED [26]

1) GettingStarted.myName returns your name
predicate failed on: "tobiasgw"

2) Functions.multiply10by20 returns 200
expected: 200
 but got: 0

3) Functions.plus adds to *arbitrary* numbers
Falsifiable (after 2 tests):
0
1

4) Functions.sum3 adds three *arbitrary* numbers
Falsifiable (after 4 tests and 2 shrinks):
0
1
0

5) Functions.isDollar returns true for '$'
uncaught exception: ErrorCall (Prelude.undefined)

6) Functions.isDollar returns false for anything but '$'
uncaught exception: ErrorCall (Prelude.undefined)

7) Functions.xor is correct
Falsifiable (after 5 tests):
True
False

8) PatternMatching.secondElement returns the second element from [12345]
expected: 2
 but got: 0

9) PatternMatching.drop3 drops the three first elements in [123456]
expected: [456]
 but got: []

10) PatternMatching.thirdAndLast returns the third element in [123]
expected: 3
 but got: 0

11) Recursion.secondToLast returns the second to last element in [1234]
expected: 3
 but got: 0

12) Recursion.listLength returns the length of an *arbitrary* list
Falsifiable (after 2 tests and 2 shrinks):
[0]

13) RecursionSchemes.add1 adds 1 to all elements in an *arbitrary* list
Falsifiable (after 2 tests and 2 shrinks):
[0]

14) RecursionSchemes.numsAsStrings converts all integers to strings
Falsifiable (after 2 tests and 2 shrinks):
[0]

15) RecursionSchemes.greaterThan2 returns integers greater than 2
Falsifiable (after 7 tests and 3 shrinks):
[3]

16) RecursionSchemes.filterNot keeps the elements that filter would remove for condition (< 2)
Falsifiable (after 4 tests):
[2]

17) Regex.find 'sub' in 'substringsubstring'
expected: ["sub","sub"]
 but got: []

18) Regex.find 'su.' in 'oosubstr'
expected: ["sub"]
 but got: []

19) Regex.find '.i.of' in 'aa1i1ofs'
expected: ["1i1of"]
 but got: []

20) Regex.find 'su*' in 'papasuubstring'
expected: ["suu","s"]
 but got: []

21) Regex.find 'ab*' in 'abbbba'
expected: ["abbbb","a"]
 but got: []

22) Regex.find 'a*b' in 'accbaaabsdab'
expected: ["b","aaab","ab"]
 but got: []

23) Regex.find '92?3?' in '125s29242s'
expected: ["92"]
 but got: []

24) Project Euler - Problem 1 is correct
expected: 233168
 but got: 0

25) HigherOrderFunctions.union should return union
Falsifiable (after 1 test):
0

26) QuickCheckExamples.encodeDecode decode is inverse encode
Falsifiable (after 2 tests and 1 shrink):
"a"

Randomized with seed 1532166121

Finished in 0.0016 seconds
27 examples, 26 failures or Preprocessing executable 'b' for hands-on-haskell-2.0.0.0...

UpdateRecords.backupDBWeekly
  - updates the record FAILED [1]

UsingDataTypes.parseLine
  - 21527 FATAL augue@tristiquepellentesque.org logged out FAILED [2]
  - 19440 INFO Nam.ac.nulla@consequat.net requested api.json FAILED [3]
  - should handle garbage "l90sm3s()u0dsada¨^s+sd" FAILED [4]

UsingDataTypes.validLogLines
  - remove garbage from log FAILED [5]

UsingDataTypes.parse
  - parse log FAILED [6]

UsingDataTypes.importantOnly
  - should remove Debug and Info log lines FAILED [7]

UsingDataTypes.sorted
  - should sort lines by timestamp, in ascending order FAILED [8]

IntBST.insert
  - insert 1 into an empty tree FAILED [9]

IntBST.insert
  - insert 2 1 3 4 into an empty tree FAILED [10]

IntBST.insert
  - make sure duplicates are ignored FAILED [11]

IntBST.inorder
*** Failed! Exception: 'Prelude.undefined' (after 1 test):
[]
  - make sure an in-order traversal ouputs a sorted list

Maybe.safeDiv
*** Failed! Exception: 'Prelude.undefined' (after 2 tests and 1 shrink):
0
1
  - make sure divide by non-zero denominator returns the same result as `div`

Maybe.safeDiv
  - make sure divide by zero returns `Nothing` FAILED [12]

Maybe.safeHead
*** Failed! Exception: 'Prelude.undefined' (after 3 tests and 2 shrinks):
[0]
  - make sure that safeHead returns the same result as `head` for non-empty lists

Maybe.safeHead
  - make sure `safeHead` returns `Nothing` for an empty list FAILED [13]

Maybe.f I
  - make sure the equation returns the correct result FAILED [14]

Maybe.f II
  - make sure the equation returns the correct result FAILED [15]

Maybe.f I
  - make sure the equation returns the correct result FAILED [16]

1) UpdateRecords.backupDBWeekly updates the record
uncaught exception: ErrorCall (Prelude.undefined)

2) UsingDataTypes.parseLine 21527 FATAL augue@tristiquepellentesque.org logged out
uncaught exception: ErrorCall (Prelude.undefined)

3) UsingDataTypes.parseLine 19440 INFO Nam.ac.nulla@consequat.net requested api.json
uncaught exception: ErrorCall (Prelude.undefined)

4) UsingDataTypes.parseLine should handle garbage "l90sm3s()u0dsada¨^s+sd"
uncaught exception: ErrorCall (Prelude.undefined)

5) UsingDataTypes.validLogLines remove garbage from log
uncaught exception: ErrorCall (Prelude.undefined)

6) UsingDataTypes.parse parse log
uncaught exception: ErrorCall (Prelude.undefined)

7) UsingDataTypes.importantOnly should remove Debug and Info log lines
uncaught exception: ErrorCall (Prelude.undefined)

8) UsingDataTypes.sorted should sort lines by timestamp, in ascending order
uncaught exception: ErrorCall (Prelude.undefined)

9) IntBST.insert insert 1 into an empty tree
uncaught exception: ErrorCall (Prelude.undefined)

10) IntBST.insert insert 2 1 3 4 into an empty tree
uncaught exception: ErrorCall (Prelude.undefined)

11) IntBST.insert make sure duplicates are ignored
uncaught exception: ErrorCall (Prelude.undefined)

12) Maybe.safeDiv make sure divide by zero returns `Nothing`
uncaught exception: ErrorCall (Prelude.undefined)

13) Maybe.safeHead make sure `safeHead` returns `Nothing` for an empty list
uncaught exception: ErrorCall (Prelude.undefined)

14) Maybe.f I make sure the equation returns the correct result
uncaught exception: ErrorCall (Prelude.undefined)

15) Maybe.f II make sure the equation returns the correct result
uncaught exception: ErrorCall (Prelude.undefined)

16) Maybe.f I make sure the equation returns the correct result
uncaught exception: ErrorCall (Prelude.undefined)

Randomized with seed 1623187750

Finished in 0.0017 seconds
19 examples, 16 failures
oops, forgot to escape <tag>
Using master's Tests.hs
Merge branch 'master' into runars_oppgaver
Added subtraction function and tests
added notes to the slides
Update test descriptions
Merge pull request #2 from tobiasgwaaler/runars_oppgaver

Runars oppgaver