File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1313
1414###
1515# @meta Exceptions
16- # @brief returns takes a value as its argument and return it to be used by try
16+ # @brief return takes a value as its argument and return it to be used by try
1717# ---
1818# (let value (return (/ 1 x)))
1919# ---
2626
2727###
2828# @meta Exceptions
29- # @brief takes a value either returned by throw or return and apply a given on it if it's an error or not
29+ # @brief Takes a value either returned by throw or return and apply a given on it if it's an error or not
3030# ---
3131# (let invert (fun (x)
3232# (if (= x 0)
Original file line number Diff line number Diff line change 11###
22# @meta Functional
3- # @brief compose function calls
3+ # @brief Compose function calls
44# ---
55# (let foo (fun (a) (* a a)))
66# (let bar (fun (b) (+ b b)))
1616
1717###
1818# @meta Functional
19- # @brief take a value as its argument and return a function taking 2 arguments which will call the first function on the value
19+ # @brief Take a value as its argument and return a function taking 2 arguments which will call the first function on the value
2020# ---
2121# (let val (left 12))
2222# (val (fun (x) (print x " i am called")) (fun (x) (print x " i am NOT called")))
3030
3131###
3232# @meta Functional
33- # @brief take a value as its argument and return a function taking 2 arguments which will call the second function on the value
33+ # @brief Take a value as its argument and return a function taking 2 arguments which will call the second function on the value
3434# ---
3535# (let val (right 12))
3636# (val (fun (x) (print x " i am NOT called")) (fun (x) (print x " i am called")))
4444
4545###
4646# @meta Functional
47- # @brief flip arguments of a function
48- # @details returns a function taking 1 argument: the second argument of the function to flip
47+ # @brief Flip the arguments of a function
48+ # @details Returns a function taking 1 argument: the second argument of the function to flip
4949# ---
5050# (let foo (fun (a b) (- a b)))
5151# ((flip foo 14) 12) # will call (foo 12 14) instead of (foo 14 12)
Original file line number Diff line number Diff line change 11###
22# @meta Switch
3- # @brief takes a value to match against a list of [possible values, function to run if it matched]
4- # @details Once the value is matched, it stops and doesn't try any other values
3+ # @brief Takes a value to match against a list of [possible values, function to run if it matched]
4+ # @details Once the value is matched, it stops and doesn't try any other values.
55# ---
66# (switch 12 [
77# [1 (fun () (print "the value is one"))]
You can’t perform that action at this time.
0 commit comments