[Haskell-beginners] Exercise of "Programming with Arrows"
Kim-Ee Yeoh
ky3 at atamo.com
Wed Oct 16 17:33:14 UTC 2013
On Wed, Oct 16, 2013 at 10:33 PM, Thiago Negri <evohunz at gmail.com> wrote:
> Updated gist: https://gist.github.com/thiago-negri/2e541a9f9762c727bdd4
Here:
prop_SP_first :: SP Int Int -> [(Int,Int)] -> Bool
prop_SP_first f xs = x1 == x2
where x1 = map snd xs
x2 = map snd (runSP (first f) xs)
you check that the second half of the coupled stream are equal, i.e. the
(arr id) input of (***) is equivalent across the equal sign:
g *** (arr id) = first g
What about the first half?
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20131017/9445f346/attachment.html>
More information about the Beginners
mailing list