File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,28 @@ switch Bool.fromStringExn("notAValidBoolean") {
6565@deprecated ("Use `fromStringOrThrow` instead" )
6666let fromStringExn : string => bool
6767
68+ /**
69+ Compares two booleans, returns an `Ordering.t` value.
70+
71+ ## Examples
72+ ```rescript
73+ Bool.compare(true, true)->assertEqual(Ordering.equal)
74+ Bool.compare(false, false)->assertEqual(Ordering.equal)
75+ Bool.compare(true, false)->assertEqual(Ordering.greater)
76+ Bool.compare(false, true)->assertEqual(Ordering.less)
77+ ```
78+ */
6879external compare : (bool , bool ) => Stdlib_Ordering .t = "%compare"
6980
81+ /**
82+ Checks if two booleans are equal and have the same value.
83+
84+ ## Examples
85+ ```rescript
86+ Bool.equal(true, true)->assertEqual(true)
87+ Bool.equal(false, false)->assertEqual(true)
88+ Bool.equal(true, false)->assertEqual(false)
89+ Bool.equal(false, true)->assertEqual(false)
90+ ```
91+ */
7092external equal : (bool , bool ) => bool = "%equal"
You can’t perform that action at this time.
0 commit comments