summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-08-19 08:20:13 -0700
committerAdam Bard <github@adambard.com>2013-08-19 08:20:13 -0700
commit3bf78afe63981a6ec95f107ca0c7a2262e1b2a2a (patch)
tree93d3137b7d4fa07070f6079a9849a80d0141f8af
parentbe04903e2b2143eecdfa6a22cd6a977a9fdba92d (diff)
parent0ff5090a5d60a91bbd8612ca4db186732bf4da72 (diff)
Merge pull request #255 from L8D/patch-1
Updated documentation for new language behavior of Whip
-rw-r--r--whip.html.markdown18
1 files changed, 9 insertions, 9 deletions
diff --git a/whip.html.markdown b/whip.html.markdown
index b8852ecb..3429ec24 100644
--- a/whip.html.markdown
+++ b/whip.html.markdown
@@ -109,18 +109,18 @@ undefined ; user to indicate a value that hasn't been set
; Dictionaries are Whip's equivalent to JavaScript 'objects' or Python 'dicts'
; or Ruby 'hashes': an unordered collection of key-value pairs.
-{"key1":"value1" "key2":2 3:3}
+{"key1" "value1" "key2" 2 3 3}
; Keys are just values, either identifier, number, or string.
-(def my_dict {my_key:"my_value" "my other key":4})
-; But in Whip, dictionaries get parsed like: value, colon, value;
-; with whitespace between each. So that means
-{"key": "value"
+(def my_dict {my_key "my_value" "my other key" 4})
+; But in Whip, dictionaries get parsed like: value, whitespace, value;
+; with more whitespace between each. So that means
+{"key" "value"
"another key"
-: 1234
+1234
}
; is evaluated to the same as
-{"key":"value" "another key":1234}
+{"key" "value" "another key" 1234}
; Dictionary definitions can be accessed used the `at` function
; (like strings and lists.)
@@ -220,8 +220,8 @@ undefined ; user to indicate a value that hasn't been set
(max (1 2 3 4)) ; 4
; If value is in list or object
(elem 1 (1 2 3)) ; true
-(elem "foo" {"foo":"bar"}) ; true
-(elem "bar" {"foo":"bar"}) ; false
+(elem "foo" {"foo" "bar"}) ; true
+(elem "bar" {"foo" "bar"}) ; false
; Reverse list order
(reverse (1 2 3 4)) ; => (4 3 2 1)
; If value is even or odd