From 4df55877387d433e2421ae17d4e27f1ffb93bc9f Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 5 Aug 2015 13:29:13 +0200 Subject: [PATCH] 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 --- hy/core/language.hy | 2 +- hy/core/macros.hy | 2 +- hy/core/shadow.hy | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hy/core/language.hy b/hy/core/language.hy index 8557760..212dd77 100644 --- a/hy/core/language.hy +++ b/hy/core/language.hy @@ -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 diff --git a/hy/core/macros.hy b/hy/core/macros.hy index 30e1f56..3f58683 100644 --- a/hy/core/macros.hy +++ b/hy/core/macros.hy @@ -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))) diff --git a/hy/core/shadow.hy b/hy/core/shadow.hy index fed7d0f..b475e37 100644 --- a/hy/core/shadow.hy +++ b/hy/core/shadow.hy @@ -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))