Remove mixtures of tabs and spaces
This commit is contained in:
parent
eec4a178b8
commit
643196c2b8
@ -296,7 +296,7 @@ As shown below, only the first matching result block is executed.
|
|||||||
... (cond [(< value 5) (print "value is smaller than 5")]
|
... (cond [(< value 5) (print "value is smaller than 5")]
|
||||||
... [(= value 5) (print "value is equal to 5")]
|
... [(= value 5) (print "value is equal to 5")]
|
||||||
... [(> value 5) (print "value is greater than 5")]
|
... [(> value 5) (print "value is greater than 5")]
|
||||||
... [True (print "value is something that it should not be")]))
|
... [True (print "value is something that it should not be")]))
|
||||||
|
|
||||||
=> (check-value 6)
|
=> (check-value 6)
|
||||||
value is greater than 5
|
value is greater than 5
|
||||||
@ -487,11 +487,11 @@ Parameters may have the following keywords in front of them:
|
|||||||
=> (defn total-value [value &optional [value-added-tax 10]]
|
=> (defn total-value [value &optional [value-added-tax 10]]
|
||||||
... (+ (/ (* value value-added-tax) 100) value))
|
... (+ (/ (* value value-added-tax) 100) value))
|
||||||
|
|
||||||
=> (total-value 100)
|
=> (total-value 100)
|
||||||
110.0
|
110.0
|
||||||
|
|
||||||
=> (total-value 100 1)
|
=> (total-value 100 1)
|
||||||
101.0
|
101.0
|
||||||
|
|
||||||
&kwargs
|
&kwargs
|
||||||
Parameter will contain 0 or more keyword arguments.
|
Parameter will contain 0 or more keyword arguments.
|
||||||
@ -525,7 +525,7 @@ Parameters may have the following keywords in front of them:
|
|||||||
|
|
||||||
=> (defn zig-zag-sum [&rest numbers]
|
=> (defn zig-zag-sum [&rest numbers]
|
||||||
(setv odd-numbers (list-comp x [x numbers] (odd? x))
|
(setv odd-numbers (list-comp x [x numbers] (odd? x))
|
||||||
even-numbers (list-comp x [x numbers] (even? x)))
|
even-numbers (list-comp x [x numbers] (even? x)))
|
||||||
(- (sum odd-numbers) (sum even-numbers)))
|
(- (sum odd-numbers) (sum even-numbers)))
|
||||||
|
|
||||||
=> (zig-zag-sum)
|
=> (zig-zag-sum)
|
||||||
@ -1115,8 +1115,8 @@ that ``import`` can be used.
|
|||||||
;; import sys as systest
|
;; import sys as systest
|
||||||
(import [tests.resources [kwtest function-with-a-dash]]
|
(import [tests.resources [kwtest function-with-a-dash]]
|
||||||
[os.path [exists
|
[os.path [exists
|
||||||
isdir :as dir?
|
isdir :as dir?
|
||||||
isfile :as file?]]
|
isfile :as file?]]
|
||||||
[sys :as systest])
|
[sys :as systest])
|
||||||
|
|
||||||
;; Import all module functions into current namespace
|
;; Import all module functions into current namespace
|
||||||
@ -1856,7 +1856,7 @@ will be 4 (``1+1 + 1+1``).
|
|||||||
=> (addition 1 1)
|
=> (addition 1 1)
|
||||||
4
|
4
|
||||||
=> (with-decorator inc2-decorator inc-decorator
|
=> (with-decorator inc2-decorator inc-decorator
|
||||||
... (defn addition [a b] (+ a b)))
|
... (defn addition [a b] (+ a b)))
|
||||||
=> (addition 1 1)
|
=> (addition 1 1)
|
||||||
8
|
8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user