@progstream/cantor-pairing
v1.0.1
Published
cantor pairing function
Downloads
8
Readme
cantor-pairing
The Cantor pairing function is a primitive recursive pairing function.
Installation
npm i @progstream/cantor-pairing
Usage
import pairing from '@progstream/cantor-pairing'
pairing.pair(3, 8)
// 74
pairing.unpair(74)
// [3, 8]