Closed avh4 closed 9 years ago
Yeah, I consciously made that choice to make the investigators sorta look like type signatures.
The idea is that tests would look like this:
claim_reverse_append =
claim
"Appending two lists then reversing the result is equivalent to reversing each list then appending"
`that`
(\(xs, ys) -> reverse (xs ++ ys))
`is`
(\(xs, ys) -> reverse xs ++ reverse ys)
`for`
tuple (list int, list int)
But later on, I'm planning on making some changes to investigators which will make it possible to define map
, map2
, andThen
, etc... As such, if you really want that function, you'll just be able to call zip
zip = map2 (,)
My first impression of using
tuple
is that the signature should beinstead of
And likewise for
tupleN
I thought I'd just log my opinion here. Feel free to close if you think the current API is correct.