开发者

In FunctionalJava.List, what does "snoc" mean?

开发者 https://www.devze.com 2023-04-11 08:48 出处:网络
FunctionJava\'s List class has a snoc method that does append: snoc The description is as follows: Appends 开发者_如何学Go(snoc) the given element to this list to produce a new list.

FunctionJava's List class has a snoc method that does append: snoc

The description is as follows:

Appends 开发者_如何学Go(snoc) the given element to this list to produce a new list.

What does the word "snoc" here mean? I have tried to look it up in Wikipedia and as an acronym with no success. Does this mean it is doing some special kind of append?

Edit: Thanks all for pointing me to cons


It's "cons" reversed as cons prepends, snoc appends.

cons originates from Lisp, I think.


The name snoc is cons backwards.

Hope this helps.

http://jlambda.com/~iop/GraphicsActor2D/doc/g2d/jlambda/List.html

0

精彩评论

暂无评论...
验证码 换一张
取 消