☰

clojerl

0.7.0+build.2033.refc431a40

  • Home
  • API Reference

Modules

  • clj_analyzer
  • clj_behaviour
  • clj_cache
  • clj_compiler
  • clj_edn
  • clj_emitter
  • clj_emitter_pattern
  • clj_env
  • clj_hash_collision
  • clj_module
  • clj_multimethod
  • clj_murmur3
  • clj_protocol
  • clj_reader
  • clj_rt
  • clj_scope
  • clj_utils
  • clj_vector
  • clojerl
  • core_eval
  • Basic Types

  • clojerl.BitString
  • clojerl.Boolean
  • clojerl.Float
  • clojerl.Fn
  • clojerl.Integer
  • clojerl.Keyword
  • clojerl.Nil
  • clojerl.String
  • clojerl.Symbol
  • erlang.Fn
  • erlang.Port
  • erlang.Process
  • erlang.Reference
  • erlang.Type
  • erlang.util.Date
  • erlang.util.Regex
  • erlang.util.UUID
  • Namespaces & Vars

  • clojerl.Namespace
  • clojerl.Var
  • Collections & Data Structures

  • clojerl.Cons
  • clojerl.Cycle
  • clojerl.Iterate
  • clojerl.LazySeq
  • clojerl.List
  • clojerl.Map
  • clojerl.Range
  • clojerl.Repeat
  • clojerl.Set
  • clojerl.SortedMap
  • clojerl.SortedSet
  • clojerl.TupleMap
  • clojerl.Vector
  • erlang.List
  • erlang.Map
  • erlang.Tuple
  • Concurrency

  • clojerl.Agent
  • clojerl.Atom
  • clojerl.Delay
  • clojerl.Future
  • clojerl.ProcessVal
  • clojerl.Promise
  • I/O

  • erlang.io.File
  • erlang.io.PushbackReader
  • erlang.io.StringReader
  • erlang.io.StringWriter
  • Errors

  • clojerl.ArityError
  • clojerl.AssertionError
  • clojerl.BadArgumentError
  • clojerl.Error
  • clojerl.ExceptionInfo
  • clojerl.IllegalAccessError
  • Protocols

  • clojerl.IAssociative
  • clojerl.IBlockingDeref
  • clojerl.IChunk
  • clojerl.IChunkedSeq
  • clojerl.IColl
  • clojerl.ICounted
  • clojerl.IDeref
  • clojerl.IEncodeClojure
  • clojerl.IEncodeErlang
  • clojerl.IEquiv
  • clojerl.IError
  • clojerl.IExceptionInfo
  • clojerl.IFn
  • clojerl.IHash
  • clojerl.IIndexed
  • clojerl.IKVReduce
  • clojerl.ILookup
  • clojerl.IMap
  • clojerl.IMeta
  • clojerl.INamed
  • clojerl.IOError
  • clojerl.IPending
  • clojerl.IRecord
  • clojerl.IReduce
  • clojerl.IReference
  • clojerl.IReversible
  • clojerl.ISeq
  • clojerl.ISeqable
  • clojerl.ISequential
  • clojerl.ISet
  • clojerl.ISorted
  • clojerl.IStack
  • clojerl.IStringable
  • clojerl.IType
  • clojerl.IVector
  • erlang.io.ICloseable
  • erlang.io.IPushbackReader
  • erlang.io.IReader
  • erlang.io.IWriter

clj_hash_collision

Hash collision handling for data structures.

Implements utility functions for dealing with the collision of hashes in data structures such as Clojure maps and sets.

Summary

Types

  • entry()
  • mapping()

Functions

  • create_entry(Map, Hash, Key, Value)
    Create a new entry.
  • equiv(MappingX, MappingY)
    Checks if the two mappings are equivalent.
  • get_entry(Map, Hash, Key)
    Gets the entry for Key in Map.
  • without_entry(Mapping, Hash, Key)
    Removes the entry for Key.

Types

entry()
-type entry() :: {any(), any()} | [{any(), any()}].

mapping()
-type mapping() :: #{integer() => entry()}.

Functions

create_entry(Map, Hash, Key, Value)
-spec create_entry(mapping(), integer(), any(), any()) ->
                      {0 | 1, entry()}.

Create a new entry.

Returns a tuple with two elements. The first is either 0 (the value for the provided key already existed) or 1 (a new value was added to the entry). The second is the created entry.

equiv(MappingX, MappingY)
-spec equiv(mapping(), mapping()) -> boolean().

Checks if the two mappings are equivalent.

get_entry(Map, Hash, Key)
-spec get_entry(mapping(), integer(), any()) ->
                   undefined | {any(), any()}.

Gets the entry for Key in Map.

Returns undefined when the entry is not found.

without_entry(Mapping, Hash, Key)
-spec without_entry(mapping(), integer(), any()) -> {- 1 | 0, mapping()}.

Removes the entry for Key.

Returns a tuple with two elements. The first is either -1 (the Key was removed) or 0 (the Key was not found). The second is the updated mapping.