Skip to content

Instantly share code, notes, and snippets.

@yuanmai
Created December 3, 2012 07:18
Show Gist options
  • Save yuanmai/4193331 to your computer and use it in GitHub Desktop.
Save yuanmai/4193331 to your computer and use it in GitHub Desktop.
Clojure data
new Dictionary<string, int>
{
{"a", 23}, {"b", 45}, {"c", 67}, {"d", 89}
};
new string[] { "Wriju", "Writam", "Deb", "Sumitra" };
:this-is-a-keyword
[:this :is :a "list"]
{:this :is, :a "map"}
#{:this :is :a "set"}
[:lets
{:put #{:everything "together"}}]
new HashMap<String, Integer>(){{
put("cat", 2);
put("dog", 1);
put("llama", 0);
put("iguana", -1);
}};
NSArray *words = @[@"list", @"of", @"words",
@123, @3.14, @{
@"key": @"value",
@"name": @"Joris",
@"n": @1234,
@3: @"string"
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment