auxlib

Deprecated in favor of aiken-extra/test_kit

An Aiken auxiliary library. Currently it contains some removed functions from stdlib, and additional stuffs.

ℹ️Package infoaiken-extra/auxlib v2.220.202501🐞
🟒Depends onaiken-lang/stdlib v2.2.0βœ…
🟒Tested withaiken v1.1.9βœ…

History

Previously we could just,

  let list_variable = [True, True, True]
  list.and(list_variable)

now if we try,

  let list_variable = [True, True, True]
  and { list_variable }

it will throw aiken::check::type_mismatch:

  Γ— While trying to make sense of your code...
  ╰─▢ I struggled to unify the types of two expressions.

  help: I am inferring the following type:

            Bool

        but I found an expression with a different type:

            List<Bool>

        Either, add type-annotation to improve my inference, or adjust the expression to have the expected type.


Summary
    1 error, 0 warnings

It is possible to use list_variable |> all(identity) from Prelude, but it’s not as clear as list.and. Hence for the time being, this library offers the following solution:

use auxlib/collections.{list_and}
  let list_variable = [True, True, True]
  list_and(list_variable)

or alternatively,

use auxlib/logics.{all_true}
  let list_variable = [True, True, True]
  list_variable |> all_true
Search Document