Skip to main content
Tweeted twitter.com/StackMma/status/708062760551243776
deleted 6 characters in body
Source Link
Kattern
  • 2.6k
  • 21
  • 36

Maybe this is a boring question, but I cannot figure it out. Because every expression has a Head, and Head[1] is Integer, and Head[Integer] is Symbol. Therefore, 1 should somehow represented as Symbol["Integer"][1] or something similar. However, Depth[1]=1Depth[1] is one which means 1 should be presented as Symbol["Integer..."], not as a expression of depth 2, such as Symbol["Integer"][1].

Therefore, whatWhat is correct representation of 1?

Maybe this is a boring question, but I cannot figure it out. Because every expression has a Head, and Head[1] is Integer, and Head[Integer] is Symbol. Therefore, 1 should somehow represented as Symbol["Integer"][1] or something similar. However, Depth[1]=1 which means 1 should be presented as Symbol["Integer..."], not as a expression of depth 2, such as Symbol["Integer"][1].

Therefore, what is correct representation of 1?

Maybe this is a boring question, but I cannot figure it out. Because every expression has a Head, and Head[1] is Integer, and Head[Integer] is Symbol. Therefore, 1 should somehow represented as Symbol["Integer"][1] or something similar. However, Depth[1] is one which means 1 should be presented as Symbol["Integer..."], not as a expression of depth 2, such as Symbol["Integer"][1].

What is correct representation of 1?

Source Link
Kattern
  • 2.6k
  • 21
  • 36

How to represent 1 as Symbol["Integer"]

Maybe this is a boring question, but I cannot figure it out. Because every expression has a Head, and Head[1] is Integer, and Head[Integer] is Symbol. Therefore, 1 should somehow represented as Symbol["Integer"][1] or something similar. However, Depth[1]=1 which means 1 should be presented as Symbol["Integer..."], not as a expression of depth 2, such as Symbol["Integer"][1].

Therefore, what is correct representation of 1?