-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.nim
31 lines (24 loc) · 1.51 KB
/
main.nim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import tables
type 爻 = object of RootObj
type 坤 = object of 爻
type 艮 = object of 爻
type 坎 = object of 爻
type 巽 = object of 爻
type 震 = object of 爻
type 离 = object of 爻
type 兑 = object of 爻
type 乾 = object of 爻
var 八卦 = {"坤":"☷","艮":"☶","坎":"☵","巽":"☴","震":"☳","离":"☲","兑":"☱","乾":"☰"}.toTable
var 六十四卦 = {"坤":"䷁","剥":"䷖","比":"䷇","观":"䷓","豫":"䷏","晋":"䷢","萃":"䷬","否":"䷋",
"谦":"䷎","艮":"䷳","蹇":"䷦","渐":"䷴","小过":"䷽","旅":"䷷","咸":"䷞","遁":"䷠",
"师":"䷆","蒙":"䷃","坎":"䷜","涣":"䷺","解":"䷧","未济":"䷿","困":"䷮","讼":"䷅",
"升":"䷭","蛊":"䷑","井":"䷯","巽":"䷸","恒":"䷟","鼎":"䷱","大过":"䷛","姤":"䷫",
"复":"䷗","颐":"䷚","屯":"䷂","益":"䷩","震":"䷲","噬嗑":"䷔","随":"䷐","无妄":"䷘",
"明夷":"䷣", "贲":"䷕", "既济":"䷾", "家人":"䷤", "丰":"䷶", "离":"䷝", "革":"䷰","同人":"䷌",
"临":"䷒","损":"䷨", "节":"䷻", "中孚":"䷼","归妹":"䷵","睽":"䷥", "兑":"䷹", "履":"䷉",
"泰":"䷊","大畜":"䷙","需":"䷄","小畜":"䷈","大壮":"䷡", "大有":"䷍","夬":"䷪","乾":"䷀"}.toTable
# 需要先实现图灵完备(Turing Complete)
proc `+`*(a,b: 爻): 爻 = discard
proc `-`(a,b: 爻): 爻 = discard
proc `*`(a,b: 爻): 爻 = discard
proc `/`(a,b: 爻): 爻 = discard