[Haskell-cafe] Getting started

aditya siram aditya.siram at gmail.com
Thu Jul 1 16:04:21 EDT 2010

Firstly, do you mean "recordSale sales anArtist anAlbum" ?

First off consider a datatype to model albums - something like:
type Name = String
type Artist = String
type Sold = Int
data Album = Album Name Sold

And consider storing then in a hash [1] where the artist name is the
key and [Album] is the value.


[1] http://www.haskell.org/ghc/docs/6.12.2/html/libraries/containers-

On Thu, Jul 1, 2010 at 2:56 PM, Mrwibbly <Jackwaters89 at googlemail.com> wrote:
> I'm having real trouble starting this project. Basically I have to create a
> record store that store information about artists and albums and also the
> number of sales that they have had. It also needs to generate a list of the
> top 5 sellers.
> So far I have: recordSale :: Sales -> String -> String -> Sales
> where recordSale sales anArtist aTrack returns a modified version of the
> sales.
> Any help getting started on this would be gratefully received. I don't want
> answers, I just want help getting started.
> Thank you
> --
> View this message in context: http://old.nabble.com/Getting-started-tp29046956p29046956.html
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list