Merge pull request #679 from hellerve/veit/long-laws

Add Long.MAX, Long.MIN, and Long.zero
This commit is contained in:
Erik Svedäng 2020-02-14 10:43:07 +01:00 committed by GitHub
commit 0223f6d381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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