Ad
  • Custom User Avatar

    Here are the ones I wrote if they help:

    const sqr = once((x) => { return x * x})
    Test.assertEquals(sqr(3), 9)
    Test.assertEquals(sqr(5), undefined)

    const add = once((a,b) => { return a + b })
    Test.assertEquals(add(1,2), 3)
    Test.assertEquals(add(5,9), undefined)
    Test.assertNotEquals(add(1,2), 3)