reset password
Author Message
rabbott
Posts: 1649
Posted 21:30 Oct 02, 2012 |

In Assignment 2 Set is defined to be a function

type Set = Int => Boolean

In Java Set is also defined as a Collection.  A number of people I saw today took advantage of the Collection definition of Set.

Don't use the Collection definition of Set.  

That is, when defining singletonSet don't write

singletonSet(elem Int) : Set = Set(elem)

To be sure you are not using Set from the Java Collections define

type MySet = Int => Boolean

and substitute MySet for Set throughout the assignment. You can do this by clicking in the file window and then typing ctrl-F. Replace Set with MySet everywhere on the page.

(Be sure to convert MySet back to Set when you submit the assignment.)

Last edited by rabbott at 21:35 Oct 02, 2012.