
people pls help me i have this weekend to finish my assignment on haskell.thats questuion1 of my assignment if somebody can help pls do so 10x in advance The aim of this assignment is to build a simulator of a programming language. The programming language contains variables (referred to by their name, given as a string), which can store an integer value: type Data = Integer type Variable = String The variable values are to be stored in a lookup table relating variable names and values, using the data synonym Store: type Store = [(Variable, Data)] (a) Define the empty Store, which contains no information about variables. (b) Define a function getVal, which takes a Store and a variable name, and returns its value. You may assume that the variable is defined in the Store. getVal :: Store -> Variable -> Data (c) Define a function setVar, which takes a Store, a variable name and a value, and returns an updated Store with the variable value updated. setVal :: Store -> (Variable, Data) -> Store -- View this message in context: http://www.nabble.com/Lists-in-haskell-t1341747.html#a3588096 Sent from the Haskell - Libraries forum at Nabble.com.

Could you be more specific on what it is that you're having trouble
with? It's not clear what point it is that you're stuck on. What have
you tried? Surely question (a) is easy enough. (hint: a Store is just
a list) If you need general information about Haskell, you might try
one of the tutorials, like Hal Daume's "Yet Another Haskell Tutorial",
which you can get from http://www.isi.edu/~hdaume/htut/
(Of course, you don't have to read the whole thing to understand
enough to do your assignment, just Chapter 3 ought to be enough.)
Apart from that, I'm not sure what anyone could tell you without
spoiling the assignment. I'm sure that once you get going on it, it
won't take too long.
If you have more specific questions, don't hesitate to ask -- though
the libraries mailing list is less appropriate than, say, haskell-cafe
;)
- Cale
On 25/03/06, iliali16
people pls help me i have this weekend to finish my assignment on haskell.thats questuion1 of my assignment if somebody can help pls do so 10x in advance
The aim of this assignment is to build a simulator of a programming language. The programming language contains variables (referred to by their name, given as a string), which can store an integer value: type Data = Integer type Variable = String The variable values are to be stored in a lookup table relating variable names and values, using the data synonym Store: type Store = [(Variable, Data)] (a) Define the empty Store, which contains no information about variables. (b) Define a function getVal, which takes a Store and a variable name, and returns its value. You may assume that the variable is defined in the Store. getVal :: Store -> Variable -> Data (c) Define a function setVar, which takes a Store, a variable name and a value, and returns an updated Store with the variable value updated. setVal :: Store -> (Variable, Data) -> Store
-- View this message in context: http://www.nabble.com/Lists-in-haskell-t1341747.html#a3588096 Sent from the Haskell - Libraries forum at Nabble.com.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On 3/25/06, Cale Gibbard
Could you be more specific on what it is that you're having trouble with? It's not clear what point it is that you're stuck on. What have you tried? Surely question (a) is easy enough. (hint: a Store is just a list) If you need general information about Haskell, you might try one of the tutorials, like Hal Daume's "Yet Another Haskell Tutorial", which you can get from http://www.isi.edu/~hdaume/htut/ (Of course, you don't have to read the whole thing to understand enough to do your assignment, just Chapter 3 ought to be enough.)
Apart from that, I'm not sure what anyone could tell you without spoiling the assignment. I'm sure that once you get going on it, it won't take too long.
If you have more specific questions, don't hesitate to ask -- though the libraries mailing list is less appropriate than, say, haskell-cafe ;)
I'd just like t suggest the #haskell channel on freenode. Plenty of people to help out. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862
participants (3)
-
Cale Gibbard
-
iliali16
-
Sebastian Sylvan