diff --git a/docs/docs/scheme-intro/data-types.md b/docs/docs/scheme-intro/data-types.md index fb49309d..917a8438 100644 --- a/docs/docs/scheme-intro/data-types.md +++ b/docs/docs/scheme-intro/data-types.md @@ -84,6 +84,24 @@ You can also convert string to symbol with: Scheme have conversion of using `->` arrow to define procedure that convert types. +In R7RS spec there is also a way to define symbols with special characters. Those symbols start and end with a vertical bar character. + +```scheme +(define |foo bar| 10) +(define |foo () bar| 20) +(display |foo bar|) +;; ==> 10 +(display |foo () bar|) +;; ==> 20 +``` + +You can also put escaped characters in symbol, like in strings: + +```scheme +(symbol=? '|\x3BB;| 'λ) +;; ==> #t +``` + ## Comments There are 3 types of comments in Scheme: