14 Apr
2015
14 Apr
'15
10:17 p.m.
Hi, Can someone please explain the difference in outputs of the following two expressions - -------------- ghci> fmap (replicate 3) (Right "blah") Right ["blah","blah","blah"] ghci> fmap (replicate 3) (Left "foo") Left "foo" --------------- Why does 'Right' return a list of Strings whereas 'Left' returns just a String. Thanks, Shishir