Commit 674e189a authored by pysaumont's avatar pysaumont
Browse files

Fixed List.take

parent 4a15eba1
......@@ -691,9 +691,9 @@ public abstract class List<A> {
protected List<A> take(int n) {
return this.isEmpty()
? this
: n > 1
: n > 0
? new Cons<>(head(), tail().take(n - 1))
: new Cons<>(head(), list());
: list();
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment