Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
2015 003 Additional operations on sequences
Additional operations on sequences
Author: John Reppy
Last revised: October 24, 2015
Discussion: issue #3
This proposal includes the addition of additional operations on the various sequence types provided by the SML Basis Library. They cover common cases that were omitted in the original version of the Basis Library. We put each module on its own page, but the collection of pages is meant to be considered as a single proposal.
- structure Option : OPTION
- structure List : LIST
- structure ListPair : LIST_PAIR
- signature STRING
- structure Vector : VECTOR
- signature MONO_VECTOR
- structure Array : ARRAY
- signature MONO_ARRAY
- signature TEXT
This propsal adds new variables to existing basis modules. Most code should be unaffected, but there are a few uncommon situations where existing code will break. These situations include
code that opens an extended structure in a context where the new identifiers are already bound. For example
fun fold x = x open Option val y = map fold (SOME 1)
code that includes an extended signature in a context where the new identifiers are already bound. For example
sig val fold : 'a -> 'a include OPTION end
structures that match the old signature, but do not include an implementation of the new operations.
This proposal adds various useful utility functions to the various sequence types in the Basis Library. Each module has a more detailed discussion of the rationale.
- [2015-10-27] Added
ListPairextensions (as suggested by Andreas Rossberg).
- [2015-10-24] Added
- [2015-08-12] Various tweaks to the format of the proposal and added impact and rationale sections.
- [2015-08-03] Proposed