Message Boards Message Boards

1
|
5627 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Finding symbols with a certain attribute

Posted 11 years ago
Is there a nice way to find all symbols with an Orderless Attribute? - This seems like a cumbersome way:
ToExpression /@ 
Select[Union[
   Cases[Trace[Information["System`*"]],
    ButtonBox[s_, __] :> s, \[Infinity]]],
  MemberQ[Attributes[#], Orderless] &]
POSTED BY: Greg Hurst
2 Replies
How about
With[{symb = Names["System`*"]}, Pick[symb, MemberQ[Attributes[#], Orderless] & /@ symb]]
POSTED BY: Andy Ross
Posted 11 years ago
Here's a way
Select[Names["System`*"], MemberQ[ToExpression[#, InputForm, Attributes], Orderless] &]
POSTED BY: Oyvind Tafjord
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract