Carp/core/Bool.carp
2020-06-23 12:26:53 +02:00

24 lines
505 B
Plaintext

(system-include "carp_bool.h")
(defmodule Bool
(register = (Fn [Bool Bool] Bool))
(implements = Bool.=)
(register copy (Fn [&Bool] Bool))
(implements copy Bool.copy)
(register format (Fn [&String Bool] String))
(register not (Fn [Bool] Bool))
(register and (Fn [Bool Bool] Bool))
(register or (Fn [Bool Bool] Bool))
(defn zero [] false)
(implements zero Bool.zero)
)
(defmodule RefBool
(defn = [a b]
(Bool.= @a @b))
(implements = RefBool.=)
)
(defn not [a] (Bool.not a))