Examples used at DUMP internship lecture, demonstrating basic functional programming concepts.
In order to run the functions defined in Main.hs, install the cabal-install package. After install, Cabal's package index might need an update:
cabal update
Examples can be tested in the Cabal REPL. To start it, run:
cabal repl
You can then invoke the loaded functions within the REPL. For example:
sum [1..10]
To run the tests, call the following function within the Cabal REPL:
quickCheck prop_<test_name>
To run the functions defined in javascript-examples folder, install NodeJS. Spin up the NodeJS interactive REPL with:
node -i
Load the module by executing .load
command within the REPL.
For example
.load javascript-examples/setState.js
You should be able to see the results of the executed function calls as well as call the defined functions within the REPL! 🎉
Google TechTalks: Haskell Amuse-Bouche by Mark Lentczner
Channel9: Functional Programming Fundamentals by Erik Meijer
Bret Victor: The Future of Programming