Groups
Groups
Sign in
Groups
Groups
scalation-devel
Conversations
About
Send feedback
Help
RichSet + examples
4 views
Skip to first unread message
Michael Cotterell
unread,
Feb 18, 2011, 1:01:45 PM
2/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scalati...@googlegroups.com, j...@cs.uga.edu
Hey guys,
Please check out
http://code.google.com/p/scalation/source/browse/branches/devel/src/scalation/collection/RichSet.scala
and let me know what you think. At the bottom of the file, I've provided examples of legal scala code that runs and compiles using RichSet.
- Michael
Michael Cotterell
unread,
Feb 18, 2011, 1:06:10 PM
2/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scalati...@googlegroups.com, j...@cs.uga.edu
Forgot to mention that
import
scalation
.
collection
.
RichSet
.
_
def
factorial
(
n
:
Int
)
=
∏
(
1
to n
)
works because I implicitly convert inclusive integer ranges to sets. I still need to write the code for doing to same with exclusive integer ranges.
Michael Cotterell
unread,
Feb 18, 2011, 1:40:38 PM
2/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scalati...@googlegroups.com, j...@cs.uga.edu
Updated the implicit conversion so that it can handle any subclass of Range (not just inclusive integer ranges). Check it out, in action, at the bottom of
http://code.google.com/p/scalation/source/browse/branches/devel/src/scalation/collection/RichSet.scala
- Michael
Reply all
Reply to author
Forward
0 new messages