Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Latest commit

 

History

History
22 lines (15 loc) · 561 Bytes

to-bool.md

File metadata and controls

22 lines (15 loc) · 561 Bytes

to-bool

to-bool converts the given value to a boolean. The function always uses humane coalescing.

Examples

  • (to-bool 0)false
  • (to-bool "0")false
  • (to-bool 1)true
  • (to-bool [])false
  • (to-bool [0])true

Forms

(to-bool value:any)bool

  • value is an arbitrary expression.

to-bool evaluates the given expression and then coalesces the result into a boolean value. See the documentation for the humane coalescer for the exact conversion rules.