Strange behaviour of REPL
Consider the following program.
coin = (True,5) ? (False,5)
lift2 :: (a,Int) -> (a,Int) -> (a,Int)
lift2 d1 d2 =
let (_,p) = d1
(y,q) = d2
in (y,p * q)
repl> let d = lift2 coin coin in let (_,p) = d in let (x,_) = d in show x ? show p
"True"
"False"
"25"
"25"
"25"
"25"
repl> let d = lift2 coin coin in let (_,p) = d in let (x,_) = d in show p ? show x
"True"
"False"
"25"
"25"
"25"
"25"
The attentive reader might notice that the order of the printed results are still the same although I changed the arguments for (?)
.
Edited by Sandra Dylus