Carp/core/Bool.carp

24 lines
505 B
Plaintext
Raw Permalink Normal View History

2018-01-24 18:08:18 +03:00
(system-include "carp_bool.h")
2018-01-24 17:53:18 +03:00
(defmodule Bool
2017-10-20 18:00:47 +03:00
(register = (Fn [Bool Bool] Bool))
(implements = Bool.=)
2017-12-04 20:28:40 +03:00
(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))
2020-06-23 13:26:53 +03:00
(defn zero [] false)
(implements zero Bool.zero)
)
(defmodule RefBool
(defn = [a b]
(Bool.= @a @b))
(implements = RefBool.=)
)
(defn not [a] (Bool.not a))