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.
|
||||
String will be used as is. Even objects with the __name__ magic will work"
|
||||
(if (and (string? value) (value.startswith *keyword-prefix*))
|
||||
(hyify (slice value 2))
|
||||
(hyify (cut value 2))
|
||||
(if (string? value)
|
||||
(hyify value)
|
||||
(try
|
||||
|
@ -221,6 +221,6 @@
|
||||
ret))
|
||||
|
||||
(defreader @ [expr]
|
||||
(let [[decorators (slice expr nil -1)]
|
||||
(let [[decorators (cut expr nil -1)]
|
||||
[fndef (get expr -1)]]
|
||||
`(with-decorator ~@decorators ~fndef)))
|
||||
|
@ -67,7 +67,7 @@
|
||||
(raise (TypeError "Need at least 2 arguments to compare"))
|
||||
(reduce operator.and_
|
||||
(list-comp (op x y)
|
||||
[(, x y) (zip args (slice args 1))]))))
|
||||
[(, x y) (zip args (cut args 1))]))))
|
||||
(defn < [&rest args]
|
||||
"Shadow < operator for when we need to import / map it against something"
|
||||
(comp-op operator.lt args))
|
||||
|
Loading…
Reference in New Issue
Block a user