2018-01-24 18:08:18 +03:00
|
|
|
(system-include "carp_bool.h")
|
2018-01-24 17:53:18 +03:00
|
|
|
|
2017-10-11 11:52:18 +03:00
|
|
|
(defmodule Bool
|
2017-10-20 18:00:47 +03:00
|
|
|
(register = (Fn [Bool Bool] Bool))
|
2020-05-09 19:59:47 +03:00
|
|
|
(implements = Bool.=)
|
2017-12-04 20:28:40 +03:00
|
|
|
(register copy (Fn [&Bool] Bool))
|
2020-05-09 19:59:47 +03:00
|
|
|
(implements copy Bool.copy)
|
2017-12-30 22:16:31 +03:00
|
|
|
(register format (Fn [&String Bool] String))
|
2019-10-03 01:23:27 +03:00
|
|
|
(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)
|
2018-02-27 16:49:06 +03:00
|
|
|
)
|
2018-01-29 00:54:59 +03:00
|
|
|
|
|
|
|
(defmodule RefBool
|
|
|
|
(defn = [a b]
|
2020-05-10 20:32:22 +03:00
|
|
|
(Bool.= @a @b))
|
|
|
|
(implements = RefBool.=)
|
|
|
|
)
|
2019-10-03 01:23:27 +03:00
|
|
|
|
|
|
|
(defn not [a] (Bool.not a))
|