[Grace-core] collections in standard prelude, .. makes ranges

Andrew P. Black black at cs.pdx.edu
Thu Jul 10 23:02:11 PDT 2014


Since Kim seemed to be waiting on this, I have made a fork that puts the collections (list, set, dictionary, and range) into the standard prelude.   I did this by copying all of the source into the standard prelude.  When Tim has figured out the right way to do this, we can abandon this fork.

In this version of Grace, the .. operator on numbers makes a range object.   Note that 7..4 makes an empty range, not a range down.

All the tests pass that passed before.  If you explicitly import collections, you get what you get previously.  If you don’t, list, set, range and dictionary are defined at the top level.

This version is in http://web.cecs.pdx.edu/~black/minigrace/js   .  The version in ~grace is unchanged, in case I have messed something up.  It’s easy to tell th difference — just print (1..3)

	Andrew





More information about the Grace-core mailing list