• Eq instance for Map. Note that we follow Haskell's implementation which unintuitively is "structurally equal" so

    import * as PlaMap from 'plutus-ledger-api/AssocMap.js'
    import { eqInteger } from 'prelude'

    let mapA : PlaMap.Map<Integer,Integer> = PlaMap.empty()
    PlaMap.insert(eqInteger, 1, 2, mapA)
    PlaMap.insert(eqInteger, 2, 1, mapA)

    and

    let mapB : PlaMap.Map<Integer,Integer> = PlaMap.empty()
    PlaMap.insert(eqInteger, 2, 1, mapB)
    PlaMap.insert(eqInteger, 1, 2, mapB)

    are considered not equal.

    Type Parameters

    • K

    • V

    Parameters

    • dictK: Eq<K>
    • dictV: Eq<V>

    Returns Eq<Map<K, V>>

Generated using TypeDoc