When I try to paste code in Trello, I get very weird formatting after saving, but it seems like it does format for code, I just can't get it to work right. What is the best way to paste code into Trello?

Currently I'm just putting links to Gist, but I would prefer to just paste it straight in there.


Question: Force Dispatch to generate dispatch tables
Answer: In version 10 even a single Rule will produce a Dispatch object:

Dispatch[ a -&gt; 1 ] // InputForm



Dispatch[{a -&gt; 1}]



Dispatch[ a -&gt; 1 ] // AtomQ



True



Association is also a hash structure and provides a comparably fast alternative to Dispatch, which an interface for adding, deleting and updating rules.  In many cases Associations may be used like Dispatch tables and they can also be used like functions.  For some performance points see:


Is there a faster way to Map an Association?