array-mumu 0.2.0-rc.5

Array tools plugin for the Mumu ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extend("test")
extend("array")

describe("array:take", () => {
  it("takes n elements", () => {
    expect_equal(array:take(3, [1,2,3,4,5]), [1,2,3])
  })
  it("takes more than length equals whole", () => {
    expect_equal(array:take(5, [9,8]), [9,8])
  })
  it("partial usage", () => {
    t1 = array:take(1)
    expect_equal(t1([4,5]), [4])
  })
})