跳转到内容

Rebol 编程/append

来自维基教科书,开放的书籍,为开放的世界
APPEND series value /only 

将值追加到序列尾部并返回序列头。

APPEND 是一个函数值。

  • series -- (类型:序列端口)
  • value -- (类型:任何)
  • /only -- 将块值追加为块

源代码

[编辑 | 编辑源代码]
append: func [
    {Appends a value to the tail of a series and returns the series head.} 
    series [series! port!] 
    value 
    /only "Appends a block value as a block"
][
    head either only [
        insert/only tail series :value
    ] [
        insert tail series :value
    ]
]
华夏公益教科书