Menu

Built-in datatypes Log in to Edit

Brandon Barker jeffrey

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 similar (identical?) interfaces in some 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 as funset. 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.


Related

Wiki: Home

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.