Getting started with Erlang. Experimenting with using the Erlang shell and getting used to the Erlang syntax.
Beginning of class session 27.
ErlangHomework. Within the folder is a file intro.erl. All your work for this assignment must be done in that file.
intro.erl in your favorite text editor. Study the provided code. Be sure you read all of the comments provided.
cd("path"). for changing the current directory
pwd(). for displaying the current direcotry
c(intro). for compiling the intro module
intro:test(). for running the test function from the intro module
Become familiar with Erlang syntax by implementing and testing the functions listed below.
I'm reassigning several of the same problems on this homework as on earlier ones. My intent is that you can focus on the differences between the languages in the context of problems that should be familiar. I hope you find this to be a good use of your time. If the problems seem too easy, please let me know.
slowFib(N).
fib(N).
first(N,L) that returns a list consisting of the first N elements of the list L.
haar(L) to calculate the 1-dimensional Haar wavelet on the list L. See homework 2 for a description of the Haar wavelet. WARNING: If you're pattern matching against an integer, make sure the argument is an integer, because 0 =/= 0.0. The trunc() function is your friend.
Turn-in your work by committing it to your SVN repository.