Can anybody translate this for a non programmer person? 

N

-----Original Message-----
From: Friam [mailto:[email protected]] On Behalf Of Marcus G.
Daniels
Sent: Saturday, April 13, 2013 1:10 PM
To: [email protected]
Subject: Re: [FRIAM] Tautologies and other forms of circular reasoning.

On 4/12/13 5:40 PM, glen wrote:
> Iteration is most aligned with stateful repetition. Recursion is most 
> aligned with stateless repetition.
Purely functional constructs can capture iteration, though.

$ cat foo.hs
import Control.Monad.State
import Control.Monad.Loops

inc :: State Int Bool
inc = do i <- get
          put (i + 1)
          return (i < 10)

main = do
   putStrLn (show (runState (whileM inc get) 5)) $ ghc --make foo.hs $ ./foo
([6,7,8,9,10],11)

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College to unsubscribe
http://redfish.com/mailman/listinfo/friam_redfish.com


============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com

Reply via email to