Fix up the rest of the code that still uses slice
Since slice was renamed to cut, update some newly introduced functions and macros that were using slice, to use cut instead. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
parent
12db748c97
commit
4df5587738
@ -416,7 +416,7 @@
|
|||||||
"Convert the given value to a string. Keyword special character will be stripped.
|
"Convert the given value to a string. Keyword special character will be stripped.
|
||||||
String will be used as is. Even objects with the __name__ magic will work"
|
String will be used as is. Even objects with the __name__ magic will work"
|
||||||
(if (and (string? value) (value.startswith *keyword-prefix*))
|
(if (and (string? value) (value.startswith *keyword-prefix*))
|
||||||
(hyify (slice value 2))
|
(hyify (cut value 2))
|
||||||
(if (string? value)
|
(if (string? value)
|
||||||
(hyify value)
|
(hyify value)
|
||||||
(try
|
(try
|
||||||
|
@ -221,6 +221,6 @@
|
|||||||
ret))
|
ret))
|
||||||
|
|
||||||
(defreader @ [expr]
|
(defreader @ [expr]
|
||||||
(let [[decorators (slice expr nil -1)]
|
(let [[decorators (cut expr nil -1)]
|
||||||
[fndef (get expr -1)]]
|
[fndef (get expr -1)]]
|
||||||
`(with-decorator ~@decorators ~fndef)))
|
`(with-decorator ~@decorators ~fndef)))
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
(raise (TypeError "Need at least 2 arguments to compare"))
|
(raise (TypeError "Need at least 2 arguments to compare"))
|
||||||
(reduce operator.and_
|
(reduce operator.and_
|
||||||
(list-comp (op x y)
|
(list-comp (op x y)
|
||||||
[(, x y) (zip args (slice args 1))]))))
|
[(, x y) (zip args (cut args 1))]))))
|
||||||
(defn < [&rest args]
|
(defn < [&rest args]
|
||||||
"Shadow < operator for when we need to import / map it against something"
|
"Shadow < operator for when we need to import / map it against something"
|
||||||
(comp-op operator.lt args))
|
(comp-op operator.lt args))
|
||||||
|
Loading…
Reference in New Issue
Block a user