Concatenates the two words word1 and word2. Eg: pr word "a 1 returns a1
listarg1 arg2
Returns a list composed of arg1 and arg2. For example, list 3 6 returns [3 6]. list “a “list returns [a list]
sentence, searg1 arg2
Returns a list composed of arg1 and arg2. If arg1 or arg2 is a list, then each element of arg1 and arg2 will become
an element of the resulting list (square brackets are deleted). Eg: se [4 3] “hello returns [4 3 hello] se [how are] “things returns [how are things]
fputarg1 list2
Insert arg1 in the first slot in list2. Eg : fput “cocoa [2] returns [cocoa 2]
lputarg1 list2
Insert arg1 in the last slot of list2. Eg: lput 5 [7 9 5] returns [7 9 5 5]
reverselist
Reverse the order of elements in list. reverse [1 2 3] returns [3 2 1]
pickarg1
If arg1 is a word, returns one of the letters of arg1 at random.
If arg1 is a list, returns one of the elements of arg1 at random.
removearg1 list2
Remove element arg1 from list list2 if it occurs there. Eg: remove 2 [1 2 3 4 2 6 ] returns [1 3 4 6]
itemn arg2
If arg2 is a word, returns the letter numbered n from the word (1 represents the first letter).
If arg2 is a list, returns the element numbered n from the list.
butlast, blarg1
If arg1 is a list, returns the whole list except for its last element.
If arg1 is a word, returns the word minus its last letter.
butfirst, bfarg1
If arg1 is a list, returns the whole list except for its first element.
If arg1 is a word, returns the word minus its first letter.
lastarg1
If arg1 is a list, returns the last element of the list.
If arg1 is a word,returns the last letter of the word.
firstarg1
If arg1 is a list, returns the first element of the list.
If arg1 is a word,returns the first letter of the word.
setitem, replacelist1 n arg3
Replace the element number n in the list list1, by the word or the list arg3. replace [a b c] 2 8 –-> [a 8 c]
additemlist1 n arg3
Adds at the position n in the list list1 the word or the list arg3 additem [a b c] 2 8 –-> [a 8 b c]
countarg1
If arg1 is a word, returns the number of letters in arg1.
If arg1 is a list, returns the number of elements in arg1.
unicodeword1
returns the Unicode value of the character word1. pr unicode "A returns 65
character,charn
Returns the character which Unicode value is n. pr character 65 returns "A