I forgot the type signiture on the last last: (~>>) :: (Seed -> (a,Seed)) -> (Seed -> (b,Seed)) -> (Seed -> (b,Seed)) (~>>) m n = \seed0 -> let (result1, seed1) = m seed0 (result2, seed2) = n seed1 in (result2, seed2) ======== With it I get this: *Main> rollDie 362354 ~>> (rollDie ~>> rollDie) <interactive>:1:0: Couldn't match expected type `Seed -> (a, Seed)' against inferred type `(Int, Seed)' In the first argument of `(~>>)', namely `rollDie 362354' In the expression: rollDie 362354 ~>> (rollDie ~>> rollDie) In the definition of `it': it = rollDie 362354 ~>> (rollDie ~>> rollDie) *Main> Michael --- On Wed, 4/22/09, Achim Schneider <barsoap@web.de> wrote:
|