Group Abstract Group Abstract

Message Boards Message Boards

0
|
5K Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Newbie Wolfram Language Question

Posted 7 years ago
Attachments:
POSTED BY: Philip Cowan
4 Replies
Posted 7 years ago

The nuts and bolts:

In[1]:= Precedence[Postfix]
Out[1]= 70.

In[2]:= Precedence[ReplaceAll]
Out[2]= 110.
POSTED BY: Hans Milton
Posted 7 years ago

Thank you to both of you for your prompt answers.

POSTED BY: Philip Cowan
Posted 7 years ago

Hi Philip,

As Claudio mentioned, you need to use parenthesis to override the default precedence. /. has a higher precedence than //. The precedence of all operators is documented here.

POSTED BY: Rohit Namjoshi

If you put parentheses to stipulate the order of operations this works.

("fish" // Characters) /. {"f" -> "d"}

(* {"d", "i", "s", "h"} *)

POSTED BY: Claudio Chaib
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard