mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
core: add Long.MAX, Long.MIN, and Long.zero
This commit is contained in:
parent
ae22172338
commit
ae3f9c49b8
@ -1,6 +1,8 @@
|
||||
(system-include "carp_long.h")
|
||||
|
||||
(defmodule Long
|
||||
(register MAX Long "LONG_MAX")
|
||||
(register MIN Long "LONG_MIN")
|
||||
(register + (λ [Long Long] Long))
|
||||
(register - (λ [Long Long] Long))
|
||||
(register * (λ [Long Long] Long))
|
||||
@ -33,6 +35,8 @@ to non-refs.")
|
||||
|
||||
(defn even? [a] (= (mod a 2l) 0l))
|
||||
(defn odd? [a] (not (even? a)))
|
||||
|
||||
(defn zero [] 0l)
|
||||
)
|
||||
|
||||
(defmodule LongRef
|
||||
|
Loading…
Reference in New Issue
Block a user