extend("test")
extend("array")
extend("string")

describe("compose", () => {
  it("should compose one sigle item add run it", () => {
    composeTest = compose(
      array:length
    ) 
    expect_equal(
      composeTest([10,20,30]),
      array:length([10,20,30])
    )
  })

  it("should compose string:to_string and array:length to return a string of the length", () => {
    lengthAsString = compose(
      string:to_string,
      array:length
    )
    expect_equal(
      lengthAsString([true,false,true]),
      "3"
    )
  })
})

describe("pipe", () => {
  it("should compose one sigle item add run it", () => {
    composeTest = pipe(
      array:length
    )
    expect_equal(
      composeTest([10,20,30]),
      array:length([10,20,30])
    )
  })

  it("should use pipe for string:to_string and array:length to return a string of the length", () => {
    lengthAsString = pipe(
      array:length,
      string:to_string
    )
    expect_equal(
      lengthAsString([true,false,true]),
      "3"
    )
  })
})
