Haskell Onboarding Repository for Haedosa Inc.
- Learn You a Haskell for Great Good!: A Beginner’s Guide
- Algorithm Design with Haskell
- Functional Programming Course (github:system-f/fp-course)
- Exercism
- Replit
- Press the green
Run
button and start a newConsole
. - Follow the instruction on the
Console
. Type in the Haskell Exercism exercise that you wish to explore or type inlist
to see the list of available exercises. - After typing in the exercise, you enter into the
cabal repl
which isghci
with libraries in.cabal
ready to be loaded. - The exercise source files are in
haskell-onboarding/exercism/haskell/<exercise>/src
. Write the code in the source file and type in:r
to reload the repl so that you can test your variable/function interactively. - Exit the
ghci>
by typing in:q
. - To test your code, refer to Exercism Guide.
- Press the green
- Start Haskell track in Exercism and get the token to run the below command
->> nix run .#get-exercises -- haskell <token> --force
->> nix run .#[Press tab twice]
.# .#leap
.#algorithm-design-with-haskell .#learn-you-a-haskell
.#default .#packages
.#devShells .#test
.#fp-course .#testproject
.#hello-world .#testroot
->> nix run .#leap.[Press tab twice]
.#leap.combined-haddock .#leap.read-the-docs-site
.#leap.pre-commit-check .#leap.test
->> nix run .#leap.test
isLeapYear
2015 - year not divisible by 4 in common year [✔]
1970 - year divisible by 2, not divisible by 4 in common year [✔]
1996 - year divisible by 4, not divisible by 100 in leap year [✔]
1960 - year divisible by 4 and 5 is still a leap year [✔]
2100 - year divisible by 100, not divisible by 400 in common year [✔]
1900 - year divisible by 100 but not by 3 is still not a leap year [✔]
2000 - year divisible by 400 in leap year [✔]
2400 - year divisible by 400 but not by 125 is still a leap year [✔]
1800 - year divisible by 200, not divisible by 400 in common year [✔]
Finished in 0.0007 seconds
9 examples, 0 failures
->> nix run nixpkgs#exercism -- submit ./exercism/haskell/<exercise>/src/<modified answer file>.hs <more modified files>
1. hello-world 2. leap 3. reverse-string 4. darts 5. space-age 6. pangram 7. bob 8. collatz-conjecture 9. rna-transcription 10. nucleotide-count 11. sum-of-multiples 12. grains 13. acronym 14. strain 15. anagram 16. clock 17. crypto-square 18. luhn 19. nth-prime 20. minesweeper 21. game-of-life 22. perfect-numbers 23. phone-number 24. secret-handshake 25. pascals-triangle 26. binary-search-tree 27. queen-attack 28. state-of-tic-tac-toe 29. word-count 30. word-search 31. wordy 32. hamming 33. robot-simulator 34. twelve-days 35. saddle-points 36. food-chain 37. ocr-numbers 38. change 39. knapsack 40. satellite 41. go-counting 42. resistor-color-duo 43. dnd-character 44. resistor-color-trio 45. run-length-encoding 46. house 47. proverb 48. simple-linked-list 49. custom-set 50. bowling 51. isbn-verifier 52. protein-translation 53. yacht 54. pythagorean-triplet 55. rotational-cipher 56. spiral-matrix 57. affine-cipher 58. alphametics 59. beer-song 60. list-ops 61. matrix 62. binary-search 63. parallel-letter-frequency 64. transpose 65. poker 66. lens-person 67. triangle 68. meetup 69. sieve 70. palindrome-products 71. simple-cipher 72. connect 73. book-store 74. pov 75. difference-of-squares 76. raindrops 77. kindergarten-garden 78. all-your-base 79. allergies 80. series 81. bank-account 82. rail-fence-cipher 83. sublist 84. sgf-parsing 85. zipper 86. armstrong-numbers 87. etl 88. scrabble-score 89. roman-numerals 90. atbash-cipher 91. pig-latin 92. robot-name 93. say 94. dominoes 95. accumulate 96. complex-numbers 97. rational-numbers 98. largest-series-product 99. prime-factors 100. matching-brackets 101. linked-list 102. two-bucket 103. zebra-puzzle 104. forth 105. diamond 106. grade-school 107. isogram