Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  Looking for a Mentor (heathmatlock)
   2.  construct list (Andy)


----------------------------------------------------------------------

Message: 1
Date: Fri, 23 Dec 2011 20:11:37 -0600
From: heathmatlock <heathmatl...@gmail.com>
Subject: [Haskell-beginners] Looking for a Mentor
To: beginners@haskell.org
Message-ID:
        <CABAYxNs0zRBRVeE2NWbU0-Qu8CemB5AAG+WmMhZvD9phQuEX=q...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi, I'm wanting to get started writing some Haskell code and would
find it helpful if someone were to meet with me regularly to work on
some problems; even if it's just going through Project Euler stuff.
Just need to speak with someone weekly checking in my progress and
discussing some of the methods used or which should have been used. I
certainly don't mind working on bugs for some Haskell related project
either. Any takers?


-- 
Heath Matlock
+1 256 274 4225



------------------------------

Message: 2
Date: Sat, 24 Dec 2011 05:35:13 -0500
From: Andy <abla...@gmail.com>
Subject: [Haskell-beginners] construct list
To: beginners@haskell.org
Message-ID: <4ef5aae1.8060...@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I have been trying to simulate "Russian peasant multiplication" in 
Haskell , but I can't produce a list of tuples after I enter 2 integers. 
I have tried constructing many accumulator functions to do so, but keep 
getting IO errors. This is NOT a homework question. I am a senior 
learning Haskell, and finding it very enjoyable, although frustrating at 
times.
----------------------------------------------------------------------------------
main1 = do
         putStrLn "Russian Peasant Multiplication \n"
         putStrLn "Enter 2 integers : "
         a <- getInt
         b <- getInt
         -- at this point I would like a list of tuples of the form [ (a 
`div` 2 , b*2 )] , starting with the 2 initial integers, down to
         -- where the first value is 1 in the last tuple: ie if the 
initial numbers were 121 and 3 say , I'd like the list
         -- [ (121,3) , (60,6) , (30,12) , (15,24) , (7,48) , (3,96) , 
(1,192) ] produced and available in main for further manipulation.

----------------------------------------
-- to read in an Int , I used :
getInt :: IO Int
getInt = do line <- getLine
             return( read line :: Int)



------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 42, Issue 26
*****************************************

Reply via email to