Skip to content

MiroDojkic/functional-programming-intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro to functional programming

Examples used at DUMP internship lecture, demonstrating basic functional programming concepts.

Running the Haskell examples

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>

Running the JavaScript examples

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! 🎉

Links

Google TechTalks: Haskell Amuse-Bouche by Mark Lentczner

Channel9: Functional Programming Fundamentals by Erik Meijer

Bret Victor: The Future of Programming

Books and papers

Structure and Interpretation of Computer Programs by Harold Abelson, Gerald Jay Sussman, Julie Sussman

Why Functional Programming matters by John Hughes

Purely Functional Data Structures by Chris Okasaki

About

Examples showcasing basic functional programming concepts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published