mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-05 04:44:12 +03:00
24 lines
505 B
Plaintext
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))
|