Re: a few questions
- To: mathgroup at smc.vnet.net
- Subject: [mg27926] Re: a few questions
- From: "Paul Lutus" <nospam at nosite.com>
- Date: Sat, 24 Mar 2001 00:48:53 -0500 (EST)
- References: <99f5km$bfk@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Tomaz Cedilnik" <tcedilnik at ntlworld.com> wrote in message news:99f5km$bfk at smc.vnet.net... > I'm editing some .m files but I currently can't access a working copy of > Mathematica so I need help. > > 1) Are the funkcions to tell whether the argument is a number/list, > NumberQ and ListQ? > > 2) How do you get the header ( a[b,c] ---> a ) ? > > 3) Does Join work like that: > Join[{1,2,3},4,{5},{6,{7,8}},9] -> {1,2,3,4,5,6,{7,8},9} > or do all arguments have to be lists? > > 4) If I define > f[x_,y_:Null] := g[x,y] > does it work like this: > f[1,2] -> g[1,2] > f[3] -> g[3] ? > > 5) Which function returns position of the element in the list? > Pos[list,element]? > > 6) How to replace a sub-list, e.g.: > {a,b,c,d,e,f,g,h} 3 {X,Y,Z} ---> {a,b,X,Y,Z,f,g,h} > > 7) What are Array, Scan, Function, Take, FoldList, Append, NestList? > My guesses: > Array[f,n] -> {f[1],f[2],...,f[n]} > Scan[f,{a,b,c,d,e}] -> f[a];f[b];f[c];f[d];f[e] A little friendly advice. You have no chance of interpreting anything more than a trivial Mathematica file without testing it with Mathematica and drawing conclusions based on the tests. -- Paul Lutus www.arachnoid.com