0

Say, I have a small list of numbers: [2,4]. (I'm using a bit of math/code notation, but the idea is the same)

If I were to add '0' to the beginning I would have [0,2,4]. I believe this is known as a prepend.

If I were to add '5' to the end I would have [0,2,4,5]. I believe this is known as an append (postpend?).

If I were to add '1' before '2' I would have [0,1,2,4]. I'm not so sure, but believe this might be a prefix.

If I were to add '3' after '2' I would have [0,1,2,3,4]. I'm not so sure, but believe this might be a suffix (postfix?).

Thoughts? Corrections?

7
  • 1
    "Postpend" is often used to mean appending to the rear vs front. "Append" could arguably be used, but is ambiguous in some contexts. Of course, "postpend" is not a "real" word, if that's of any concern to you. For inserting values in the middle I'd use "insert before" or "insert after" -- any other term is apt to be ambiguous.
    – Hot Licks
    Commented May 12, 2015 at 1:10
  • What is the question? Are you looking for terms to describe the insertion of 1 and 3, here? If so, there is no special term, besides insert (before or after).
    – Drew
    Commented May 12, 2015 at 1:19
  • Well, I was hoping to keep to the same sort of "theme", that is "pre/post" or something similar for both. Insert certainly works, but is more lengthy when specifying before or after. Not like that's any sort of real problem, more just me nitpicking.
    – user109820
    Commented May 12, 2015 at 1:49
  • This is what car and cdr are for. Commented May 12, 2015 at 2:07
  • FWIW: The C++ programming language includes a library of "containers", a "list" is one type of container, as is a "deque" (double-ended queue). The terms used in C++ for the operations you describe are push_front, push_back, and insert. Insertion is done before the element specified.
    – amdn
    Commented May 12, 2015 at 2:45

4 Answers 4

1

Look up the terms:

  • prefix (add at beginning – 'prepend')
  • postfix (add at ending – 'append')
  • infix ('insert' in between)
  • adfix (hypernym for all above)

Note that the "xfix"s and the "xpend"s are independent sets. Both sets of terms exist and are used in different contexts, but never mixed.

HTH.

1
  • Can you elaborate on the context differences? I've been reading through definitions since before I asked the question, and cannot seem to grasp the difference.
    – user109820
    Commented May 12, 2015 at 15:04
0

If you want something that has some consistency with prepend and postpend, use

  • interpose

http://i.word.com/idictionary/interpose

-1

The terms that come to mind here are ones often used in phonology: word-initial and word-final.

These are compact ways of saying

At the beginning of the word...
At the end of the word...

So for these to be relevant to your situation, we can just change word to list. Now you can make sentences like these:

Add a list-initial 0 and a list-final 5.

As for a term for the middle, you might say list-middle, but that sounds strange.

Also, the word for a "fix" in the middle of the word is infix and the word encompassing all "fixes" is affix.

4
  • "the word encompassing all "fixes" is affix." etc., -- source?
    – Kris
    Commented May 12, 2015 at 5:47
  • @Kris Wikipedia's article on affixes
    – Adam
    Commented May 12, 2015 at 5:50
  • Please, always site the source.
    – Kris
    Commented May 12, 2015 at 5:53
  • @Kris I don't see sources in your answer.
    – Adam
    Commented May 12, 2015 at 5:54
-1

Since you mention using code notation, it's worth noting that in programming lingo, what you have done is:

  • added/inserted 'head' (first node)

  • added/inserted 'tail' (last node)

  • inserted before given node

  • inserted after given node

[Wikipedia]

You must log in to answer this question.