-
Notifications
You must be signed in to change notification settings - Fork 55
Built in datatypes
ATS has a number of data structures found in both functional and imperative programming. We summarize them here.
-
Maps (dictionaries). Several implementations of maps are available, with nearly identical interfaces in most cases. Look for linmap or funmap. These are based on AVL trees or red-black trees. Use funmap variants unless you wish to employ linear types.
-
Strings (C strings). ATS provides a safe mechanism to use the infamous but efficient C string.
-
Arrays.
-
Sets. ATS includes linear sets as
linset
and functional sets asfunset
. These are based on AVL trees, red-black trees, or ordered-lists.Integer multisets are also available. The book Introduction to Programming in ATS includes a discussion and implementation of red-black trees useful for sets.
-
Regular expressions. ATS provides an interface to PCRE, a library for Perl-style regular expressions.