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) Copy
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) Copy
let mapB : PlaMap.Map<Integer,Integer> = PlaMap.empty()PlaMap.insert(eqInteger, 2, 1, mapB)PlaMap.insert(eqInteger, 1, 2, mapB)
are considered not equal.
Generated using TypeDoc
Eq instance for Map. Note that we follow Haskell's implementation which unintuitively is "structurally equal" so
and
are considered not equal.