From a619082c76dfeb04225b446bdcc3b3fced891364 Mon Sep 17 00:00:00 2001 From: Luka Jacobowitz Date: Tue, 14 Aug 2018 14:27:53 +0200 Subject: [PATCH] Rename snoc and cons to append and prepend for consistency --- core/src/main/scala/cats/data/Chain.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/main/scala/cats/data/Chain.scala b/core/src/main/scala/cats/data/Chain.scala index 12d1549ef77..f8870b9f882 100644 --- a/core/src/main/scala/cats/data/Chain.scala +++ b/core/src/main/scala/cats/data/Chain.scala @@ -72,26 +72,26 @@ sealed abstract class Chain[+A] { /** * Returns a new Chain consisting of `a` followed by this. O(1) runtime. */ - final def cons[A2 >: A](a: A2): Chain[A2] = + final def prepend[A2 >: A](a: A2): Chain[A2] = append(one(a), this) /** - * Alias for [[cons]]. + * Alias for [[prepend]]. */ final def +:[A2 >: A](a: A2): Chain[A2] = - cons(a) + prepend(a) /** * Returns a new Chain consisting of this followed by `a`. O(1) runtime. */ - final def snoc[A2 >: A](a: A2): Chain[A2] = + final def append[A2 >: A](a: A2): Chain[A2] = append(this, one(a)) /** - * Alias for [[snoc]]. + * Alias for [[append]]. */ final def :+[A2 >: A](a: A2): Chain[A2] = - snoc(a) + append(a) /** * Applies the supplied function to each element and returns a new Chain.