8.12
5.10 Conditionals
5.10.1 丫,、
🐘
Examples:
5.10.2 并、戈
5.10.3 当、肖,夬
当: means when, on the condition of in modern chinese.
肖: means resemble, case in modern chinese.
夬: simplifies for 缺/决 in ancient chinese, means absent/burst, especially means when no conditions or cases take effect in ming-lang.
Imagine that the data flow is importing in, lots of conditions and cases are implemented as export paths, 夬 is a breaking point for data to export when no valid conditions and cases are effective.
Examples:
> (当 [(? 0) (displayln "positive number")] [(? 0) (displayln "negative number")] [夬 (displayln "neither positive or negative number")]) neither positive or negative number
> (肖 (+ 1 1) [(1) (displayln "result is 1")] [(2) (displayln "result is 2")] [夬 (displayln "result is neither 1 or 2")]) result is 2
5.10.4 非
🐘 𥟍
5.10.5 References
(require ming/racket/base) | package: ming |