# What does a/.b[c][[1]] mean? [closed]

The function b[c_] has been previously defined. Does that "1" refer to the smallest number of a list?

• Jun 14 '19 at 19:10
• Actually, "1" refers to the first element of a list, not the smallest number of a list. Thus a[[1]] is the same as First[a]. Jun 14 '19 at 23:49

If you just want to know what the double brackets mean, you can highlight them and use help. Or, you can use Information (?), for example:

?[[


Or, you can use Hold with FullForm to figure out what it means:

a /. b[c][[1]] //Hold //FullForm


Hold[ReplaceAll[a,Part[b[c],1]]]

Yes, 1 refers to the first element of the list. "/." is a rule replacement so I presume in this case that function "b" is returning a list of rules, which the line of code intends to use as a replacement operator for a.

Starting list or array notation at "1" is sometimes confusing for people used to "c" starting indices at 0. Note that there is a form of "Mod" that will properly provide the right index so you don't end up with "0" when you try to get a part of a list.