ATSLIB/libats/ML/funmap

This package implements functional associative maps based on ordered AVL-trees.
  • map
  • map_type
  • funmap_nil
  • funmap_make_nil
  • funmap_search
  • funmap_insert
  • funmap_takeout
  • funmap_remove
  • funmap_listize

  • map

    Synopsis

    typedef
    map(key:t0p
       ,
       itm:t0p) = map_type(key, itm)

    map_type

    Synopsis

    abstype
    map_type
    (
      key:t@ype
    , itm:t0ype+
    ) = ptr(*boxed*)

    funmap_nil

    Synopsis

    fun{}
    funmap_nil
      {key,itm:t0p}():<> map(key, itm)

    funmap_make_nil

    Synopsis

    fun{}
    funmap_make_nil
      {key,itm:t0p}():<> map(key, itm)

    funmap_search

    Synopsis

    fun{
    key,itm:t0p
    } funmap_search
    (
      map: map(key, INV(itm)), k0: key
    ) : Option_vt(itm) // end of [funmap_search]

    funmap_insert

    Synopsis

    fun{
    key,itm:t0p
    } funmap_insert
    (
      &map(key, INV(itm)) >> _, key, itm
    ) : Option_vt(itm) // end of [funmap_insert]

    funmap_takeout

    Synopsis

    fun{
    key,itm:t0p
    } funmap_takeout
    (
      map: &map(key, INV(itm)) >> _, k0: key
    ) : Option_vt(itm) // end of [funmap_takeout]

    funmap_remove

    Synopsis

    fun{
    key,itm:t0p
    } funmap_remove
      (map: &map(key, INV(itm)) >> _, k0: key): bool

    funmap_listize

    Synopsis

    fun{
    key,itm:t0p
    } funmap_listize
      (map: map(key, INV(itm))): list0 @(key, itm)

    This page is created with ATS by Hongwei Xi and also maintained by Hongwei Xi. SourceForge.net Logo