The singletonSet function returns a function that returns true when past
the same integer that was used to create the function and false otherwise.
So the contains function should work as expected. You pass the function
returned from singletonSet into contains, so contains never calls
singletonSet.
asset(contains(singletonSet(5), 5) == true)
asset(contains(singletonSet(5), 2) == false)
I hope this makes sense and helps a little,
Iain.
On Sep 28, 2012 8:26 PM, "spida" <andoni.oconchubh...@gmail.com> wrote:
> Hi all,
> How is anyone/everyone getting on with this week's maths test?
> Is it just me or does the "contains()" function not work for anyone else
> for the singletonSet(). The way I see it, if you pass an element to the
> singletonSet() function it returns the set of that element=>true, so in
> testing it using the contains function it will always return true as it
> creates a new singleton set with the "elem" integer that you are testing it
> with.
> Thoughts?