Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.3K Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

Convert shorthand form to full form

Posted 4 years ago

Mathematica offers the use of shorthand notation.

Can I apply some kind of a tool that converts a shorthand notation to a "long" notation?

For example, turn this

(3 + #) &[x]

to

Function[3 + #][x]

It would help me to understand the experts' answers in the community so to better understand the notation and the Mathematica syntax.

POSTED BY: Ehud Behar
Posted 4 years ago

Not exactly what you are looking for

Hold[(3 + #) &[x]] // FullForm
(* Hold[Function[Plus[3, Slot[1]]][x]] *)

Hold, or any other construct that prevents evaluation is required, otherwise

(3 + #) &[x] // FullForm
(* Plus[3, x] *)

(x + 1) // g // FullForm
(* g[Plus[1, x]] *)

f @@ g[x] // FullForm
(* f[x] *)

Hold[f @@ g[x]] // FullForm
(* Hold[Apply[f, g[x]]] *)
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard