
michael rice
OK, I changed the operator from (>>) to (~>>). When I try to use it I get this:
[michael@localhost ~]$ ghci rand GHCi, version 6.10.1: http://www.haskell.org/ghc/__ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Main________________________ ( rand.hs, interpreted ) Ok, modules loaded: Main. *Main> rollDie ~>> (rollDie ~>> rollDie)
<interactive>:1:0: ______ No instance for (Show (Seed -> (Int, Seed))) __________ arising from a use of `print' at <interactive>:1:0-32 ______ Possible fix: __________ add an instance declaration for (Show (Seed -> (Int, Seed))) ______ In a stmt of a 'do' expression: print it
Well, you obviously need an initial seed: rollDie 0xdeadbeef ~>> (rollDie ~>> rollDie) -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited.