Haskell笔记 (6)—— 字符串

(1)

The empty string is written “”, and is a synonym for [].

举例如下:

> "" == []
True

(2)

Since a string is a list of characters, we can use the regular list operators to construct new strings.

举例如下:

> 'a':"bc"
"abc"
> "foo" ++ "bar"
"foobar"

 

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理