mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
Merge pull request #679 from hellerve/veit/long-laws
Add Long.MAX, Long.MIN, and Long.zero
This commit is contained in:
commit
0223f6d381
@ -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