Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Week 2 Assignment - Sets
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
spida  
View profile  
 More options Sep 28 2012, 3:26 pm
From: spida <andoni.oconchubh...@gmail.com>
Date: Fri, 28 Sep 2012 12:26:47 -0700 (PDT)
Local: Fri, Sep 28 2012 3:26 pm
Subject: Week 2 Assignment - Sets

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?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spida  
View profile  
 More options Sep 28 2012, 4:33 pm
From: spida <andoni.oconchubh...@gmail.com>
Date: Fri, 28 Sep 2012 13:33:11 -0700 (PDT)
Local: Fri, Sep 28 2012 4:33 pm
Subject: Re: Week 2 Assignment - Sets

Doh! Yep, it's not a self-fulfilling profecy afterall!

Best tip to those of you that haven't started yet is get the JUnit testing
going in tandem with your working on the exercise.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spida  
View profile  
 More options Sep 28 2012, 4:51 pm
From: spida <andoni.oconchubh...@gmail.com>
Date: Fri, 28 Sep 2012 13:51:15 -0700 (PDT)
Local: Fri, Sep 28 2012 4:51 pm
Subject: Re: Week 2 Assignment - Sets

*prophecy (even)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "107 Week 2 Assignment - Sets" by Iain Hull
Iain Hull  
View profile  
 More options Sep 28 2012, 4:57 pm
From: Iain Hull <iainh...@gmail.com>
Date: Fri, 28 Sep 2012 21:57:33 +0100
Local: Fri, Sep 28 2012 4:57 pm
Subject: Re: [Scala Enthusiasts Dublin] 107 Week 2 Assignment - Sets

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »