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:
Gergely Nagy 2015-08-05 13:29:13 +02:00
parent 12db748c97
commit 4df5587738
No known key found for this signature in database
GPG Key ID: 0A083C5F06E0DD42
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)))

View File

@ -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))