mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
Remove str, fix hash/=.
This commit is contained in:
parent
85cacf538f
commit
c14a38a457
@ -28,35 +28,9 @@
|
||||
(defn to-int [k]
|
||||
(to-int @(the (Ref Char) (Unsafe.coerce (the (Ref Id) &k)))))
|
||||
(defn hash [k]
|
||||
(to-int @k))
|
||||
(to-int (the Id @k)))
|
||||
(defn = [a b]
|
||||
(= (to-int @a) (to-int @b)))
|
||||
(defn str [cid]
|
||||
(match cid
|
||||
Black @"Black"
|
||||
Red @"Red"
|
||||
Green @"Green"
|
||||
Yellow @"Yellow"
|
||||
Blue @"Blue"
|
||||
Magenta @"Magenta"
|
||||
Cyan @"Cyan"
|
||||
White @"White"
|
||||
Reset @"Reset"
|
||||
None @"None"
|
||||
Bold @"Bold"
|
||||
Italic @"Italic"
|
||||
Underline @"Underline"
|
||||
BlinkSlow @"BlinkSlow"
|
||||
BlinkRapid @"BlinkRapid"
|
||||
BgBlack @"BgBlack"
|
||||
BgRed @"BgRed"
|
||||
BgGreen @"BgGreen"
|
||||
BgYellow @"BgYellow"
|
||||
BgBlue @"BgBlue"
|
||||
BgMagenta @"BgMagenta"
|
||||
BgCyan @"BgCyan"
|
||||
BgWhite @"BgWhite"))
|
||||
|
||||
(= (to-int (the Id @a)) (to-int (the Id @b))))
|
||||
|
||||
(def table
|
||||
{(Black) @"30"
|
||||
|
Loading…
Reference in New Issue
Block a user