Message Boards Message Boards

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

Finding symbols with a certain attribute

Posted 12 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
Posted 12 years ago
Here's a way
Select[Names["System`*"], MemberQ[ToExpression[#, InputForm, Attributes], Orderless] &]
POSTED BY: Oyvind Tafjord
How about
With[{symb = Names["System`*"]}, Pick[symb, MemberQ[Attributes[#], Orderless] & /@ symb]]
POSTED BY: Andy Ross
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