summaryrefslogtreecommitdiffhomepage
path: root/whip.html.markdown
diff options
context:
space:
mode:
authorC. Bess <cbess@company.com>2015-11-09 17:55:53 -0600
committerC. Bess <cbess@company.com>2015-11-09 17:55:53 -0600
commitdf0992d72c2a28f140e6ff9681c505f36e19249a (patch)
tree508aa3abe4c25b957dca442560d9c95c9b1fc97a /whip.html.markdown
parentafc5ea14654e0e9cd11c7ef1b672639d12418bad (diff)
parentc460e1fafa0e9b4edc6a5cb35b970bb5cc030a81 (diff)
Merge remote-tracking branch 'adambard/master'
Conflicts: swift.html.markdown
Diffstat (limited to 'whip.html.markdown')
-rw-r--r--whip.html.markdown17
1 files changed, 9 insertions, 8 deletions
diff --git a/whip.html.markdown b/whip.html.markdown
index 3faee98a..e7e5e427 100644
--- a/whip.html.markdown
+++ b/whip.html.markdown
@@ -2,13 +2,14 @@
language: whip
contributors:
- ["Tenor Biel", "http://github.com/L8D"]
+ - ["Saurabh Sandav", "http://github.com/SaurabhSandav"]
author: Tenor Biel
author_url: http://github.com/L8D
filename: whip.lisp
---
Whip is a LISP-dialect made for scripting and simplified concepts.
-It has also borrowed a lot of functions and syntax from Haskell(a non-related language).
+It has also borrowed a lot of functions and syntax from Haskell (a non-related language).
These docs were written by the creator of the language himself. So is this line.
@@ -93,13 +94,13 @@ null ; used to indicate a deliberate non-value
undefined ; user to indicate a value that hasn't been set
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; 2. Vairbles, Lists, and Dicts
+; 2. Variables, Lists, and Dicts
; Variables are declared with the `def` or `let` functions.
; Variables that haven't been set will be `undefined`.
(def some_var 5)
; `def` will keep the variable in the global context.
-; `let` will only have the variable inside its context, and has a wierder syntax.
+; `let` will only have the variable inside its context, and has a weirder syntax.
(let ((a_var 5)) (+ a_var 5)) ; => 10
(+ a_var 5) ; = undefined + 5 => undefined
@@ -163,7 +164,7 @@ undefined ; user to indicate a value that hasn't been set
(my_function 10 10) ; = (+ (+ 10 10) 10) => 30
-; Obiously, all lambdas by definition are anonymous and
+; Obviously, all lambdas by definition are anonymous and
; technically always used anonymously. Redundancy.
((lambda (x) x) 10) ; => 10
@@ -171,12 +172,12 @@ undefined ; user to indicate a value that hasn't been set
; Comprehensions
; `range` or `..` generates a list of numbers for
-; each number between it's two args.
+; each number between its two args.
(range 1 5) ; => (1 2 3 4 5)
(.. 0 2) ; => (0 1 2)
-; `map` applies it's first arg(which should be a lambda/function)
-; to each item in the following arg(which should be a list)
+; `map` applies its first arg (which should be a lambda/function)
+; to each item in the following arg (which should be a list)
(map (-> (x) (+ x 1)) (1 2 3)) ; => (2 3 4)
; Reduce
@@ -191,7 +192,7 @@ undefined ; user to indicate a value that hasn't been set
(slice (.. 1 5) 2) ; => (3 4 5)
(\ (.. 0 100) -5) ; => (96 97 98 99 100)
-; `append` or `<<` is self expanatory
+; `append` or `<<` is self explanatory
(append 4 (1 2 3)) ; => (1 2 3 4)
(<< "bar" ("foo")) ; => ("foo" "bar")