Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6141923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:19:03+00:00 2026-05-23T18:19:03+00:00

I was playing around with the Prefix and Postfix operators ( @ and //

  • 0

I was playing around with the Prefix and Postfix operators (@ and // respectively) and I ran into the following issue.

Given the following code, they evaluate in the same exact way:

Hold[MatrixPlot@Sort@data] // FullForm
(* Hold[MatrixPlot[Sort[data]]] *)

Hold[data // Sort // MatrixPlot] // FullForm
(* Hold[MatrixPlot[Sort[data]]] *)

However, given the following expressions, I get different results:

FunctionExpand@Abs'[0]
(* Abs'[0] *)

Abs'[0] // FunctionExpand
(* 0 *)

I’m not quite sure really why this is. In dozens of other snippets of code I’ve had, f@expr, expr // f, and f[expr] all evaluate to the same result. Why does this one particular case give this result?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:19:03+00:00Added an answer on May 23, 2026 at 6:19 pm

    This is a precedence issue. @ has higher precedence than //. To see what is going on, place the cursor on FunctionExpand in both cases, then either cmd+. (on OS X) or ctrl+. on anything else, and you end up selecting things by precedence.

    Another way to see it is to use Trace:

    FunctionExpand@Abs'[0] // Trace
    (*
    -> {{{FunctionExpand[Abs],Abs},Abs^\[Prime]},(Abs^\[Prime])[0]}
    *)
    

    while

    Abs'[0] // FunctionExpand//Trace
    (*
    -> {FunctionExpand[(Abs^\[Prime])[0]],0}
    *)
    

    In particular, notice how in the first case mma first evaluates FunctionExpand[Abs], obtaining Abs, then continuing. This is precisely due to how strongly @ binds as compared to //.

    EDIT: Inspired by @Leonid’s comment, this is also informative:

    Hold[FunctionExpand@Abs'[0]] // FullForm
    Hold[Abs'[0] // FunctionExpand] // FullForm
    (*
    -> Hold[Derivative[1][FunctionExpand[Abs]][0]]
       Hold[FunctionExpand[Derivative[1][Abs][0]]]
    *)
    

    which is a much better demonstration of what is going on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm playing around with LinqToSQL using an existing multi-lingual database, but I'm running into
While playing around with one-to-one associations in castle activerecord I stumbled upon the following
Just playing around with java trying to learn it etc. Here is my code
Just playing around with Rails 3.1 at the moment, and one issue I'm having
Recently playing around with the open source iphone app code, and found it uses
When playing around with Pointfree I was presented with a piece of code that
Playing around a bit more with jqTouch and am running into a problem with
Am playing around with the standard Wordpress search and am using this code in
Just playing around with some sample code and hit on an unexpected problem with
Been playing around with Cassandra and I am trying to evaluate what would be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.