Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 558 Bytes

to-int.md

File metadata and controls

21 lines (14 loc) · 558 Bytes

to-int

to-int converts the given value to an integer number. The function always uses humane coalescing.

Examples

  • (to-int "0")0
  • (to-int 1.0)1
  • (to-int 1.2) ➜ error, no lossless conversion possible
  • (to-int []) ➜ error

Forms

(to-int value:any)int

  • value is an arbitrary expression.

to-int evaluates the given expression and then coalesces the result into an integer value. See the documentation for the humane coalescer for the exact conversion rules.