A Logiweb page defining an append function

Martin Røpcke

2. juni 2005

This document defines and tests a function for appending lists. First we define then name of the page:

[append )^{pyk} “append”]

Having done this we next define the TEX rendering of the append function, which is what decides how the text appears when using the function later on:

[append(x, y) )^{tex} “append(#1., #2.)”].

Next we declare the value of the function:

[append(x, y) )^{val} y : : x]. ^{1}

And finally, we must test it:

[append(2, 1) ≈ 1 : : 2]^{·}.

This results in a message Claim succeeded from the pyk compiler. Had we instead tested the expression [append(1, 2) ≈ 1 :: 3], the pyk compiler would have given us the message Claim failed. The little dot, “·”, after the brackets tells us that the expression has been evaluated.

In future Logiweb pages one can now use the append function by refering to this page called append with the kana reference:

append: nani

taka sini sinu tiki kase nasu nena kusi nesu nune siti sisu neki kika nutu saki seni sesu tina naka suku kasi kesa katu kana sete sise nasa natu

1[append(x, y) )^{pyk} “append ∗ to ∗ end append”]