making a Set

Tom Pledger
Thu, 22 Feb 2001 09:23:03 +1300

(moved to haskell-cafe)

G Murali writes:
 | hi there,
 | I'm tryng to get my concepts right here.. can you please help in
 | defining a funtion like
 | makeSet :: (a->Bool)->Set a
 | I understand that we need a new type Set like
 | data Set a = Set (a->Bool) what puzzles me is how to apply the funtion
 | to all elements belonging to type a.

What other operations do you need to implement for "Set a"?  Is there
anything that can't be expressed in terms of those set membership
functions you already have?