RosettaCodeData/Task/Literals-Integer/Fennel/literals-integer.fennel

8 lines
239 B
Fennel

;; Fennel, like Lua, supports base 10 and hex literals (with a leading 0x).
1234 ;1234
0x1234 ;4660
;; Optionally, underscores can be used to split numbers into readable chunks.
123_456_789 ;123456789
0x1234_5678 ;305419896