;; This is inline comment (to the end of the line). (; (1) This is block comment. block comment is keeping until the terminator -> ;) ;; (2) (; (; These block comments can be nested. ;) ;)
-
(;
is the start of block comment -
;)
is the end of block comment
0 ;; Fuzzy Numeric. (default: Natural) -1 +1 ;; Fuzzy Integer. (default: Integer) 0.0 ;; Fuzyy Decimal. (default: Decimal) 1/2 ;; Rational. 'a' ;; Charactor. (same as Uint32) "" ;; Fuzzy Text. (default: String_UTF8) :key ;; Keyword. [] ;; Fuzzy Sequence. (default: List) {} ;; Key-Value Map.
Fuzzy Types | Include Types |
---|---|
Fuzzy_Numeric |
Uint8, Uint16, Uint32, Uint64, Natural, and Fuzzy_Integer |
Fuzzy_Integer |
Int8, Int16, Int32, Int64, Integer, and Fuzzy_Decimal |
Fuzzy_Decimal |
Float16, Float32, Float64, Flonum |
Fuzzy_Text |
Bytes, String_UTF8, String_UTF16, String_UTF32 |
Fuzzy_Sequence |
List, Vector, Array, Sequence |
;; Declare procedure or constant value or variable value. (dec x Integer) ;; Declare a constant value once. (val x 1000) ;; Declare a mutable variable value. (var y 0) ;; Strictly typing with literal. (val z (as 0 Uint8)) (var w (as "something" Bytes)) ;; Reassign (set! y 1000) ;; OK (set! y "hello") ;; Can't. `y` has been declered as Number type. (set! x 10) ;; Can't. `x` has been declered as immutable.
;; Simply calling a procedure. (foo a b c) ;; Calling closure. ((=> (a) (* a a)) 10) ;; returns 100
# simply run test-suites
stack test
# run test-suites and generate coverage-report
stack test --coverage
# open coverage-report in your browser
open $(stack path --local-hpc-root)/index.html