{"action":"created","comment":{"url":"https://api.github.com/repos/javaslang/javaslang/pulls/comments/61675716","id":61675716,"diff_hunk":"@@ -0,0 +1,853 @@\n+/*     / \\____  _    _  ____   ______  / \\ ____  __    _______\n+ *    /  /    \\/ \\  / \\/    \\ /  /\\__\\/  //    \\/  \\  //  /\\__\\   JΛVΛSLΛNG\n+ *  _/  /  /\\  \\  \\/  /  /\\  \\\\__\\\\  \\  //  /\\  \\ /\\\\/ \\ /__\\ \\   Copyright 2014-2016 Javaslang, http://javaslang.io\n+ * /___/\\_/  \\_/\\____/\\_/  \\_/\\__\\/__/\\__\\_/  \\_//  \\__/\\_____/   Licensed under the Apache License, Version 2.0\n+ */\n+package javaslang.collection;\n+\n+import javaslang.*;\n+import javaslang.collection.Comparators.SerializableComparator;\n+import javaslang.collection.Tree.Node;\n+import javaslang.control.Option;\n+\n+import java.util.*;\n+import java.util.function.*;\n+\n+import static javaslang.collection.Comparators.naturalComparator;\n+\n+public class PriorityQueue<T> extends PriorityQueueBase<T, PriorityQueue<T>> {\n+    private static final long serialVersionUID = 1L;\n+\n+    private PriorityQueue(Comparator<T> comparator, List<Node<Ranked<T>>> forest) {\n+        super(comparator, forest);\n+    }\n+\n+    @Override\n+    PriorityQueue<T> with(List<Node<Ranked<T>>> forest) {\n+        return new PriorityQueue<>(this.comparator, forest);\n+    }\n+\n+    /**\n+     * Returns the empty PriorityQueue.\n+     *\n+     * @param <T> Component type\n+     * @return The empty PriorityQueue.\n+     */\n+    @SuppressWarnings(\"unchecked\")\n+    public static <T extends Comparable<T>> PriorityQueue<T> empty() {\n+        return empty(naturalComparator());\n+    }\n+\n+    public static <T> PriorityQueue<T> empty(Comparator<T> comparator) {\n+        return new PriorityQueue<>(comparator, List.empty());\n+    }\n+\n+    /**\n+     * Narrows a widened {@code PriorityQueue<? extends T>} to {@code PriorityQueue<T>}\n+     * by performing a type safe-cast. This is eligible because immutable/read-only\n+     * collections are covariant.\n+     *\n+     * @param queue An {@code PriorityQueue}.\n+     * @param <T>   Component type of the {@code PriorityQueue}.\n+     * @return the given {@code PriorityQueue} instance as narrowed type {@code PriorityQueue<T>}.\n+     */\n+    @SuppressWarnings(\"unchecked\")\n+    public static <T> PriorityQueue<T> narrow(PriorityQueue<? extends T> queue) {\n+        return (PriorityQueue<T>) queue;\n+    }\n+\n+\n+    @SuppressWarnings(\"unchecked\")\n+    public static <T extends Comparable<T>> PriorityQueue<T> of(T... elements) {\n+        return of(naturalComparator(), elements);\n+    }\n+\n+    @SuppressWarnings(\"unchecked\")\n+    public static <T extends Comparable<T>> PriorityQueue<T> of(Comparator<T> comparator, T... elements) {\n+        return ofAll(comparator, List.of(elements));\n+    }\n+\n+    public static <T extends Comparable<T>> PriorityQueue<T> ofAll(Iterable<? extends T> elements) {\n+        return ofAll(naturalComparator(), elements);\n+    }\n+\n+    public static <T> PriorityQueue<T> ofAll(Comparator<T> comparator, Iterable<? extends T> elements) {\n+        Objects.requireNonNull(elements, \"elements is null\");\n+        return List.ofAll(elements).foldLeft(empty(comparator), PriorityQueue::insert);\n+    }\n+\n+    @Override\n+    public List<T> toList() {\n+        List<T> results = List.empty();\n+        for (PriorityQueue<T> queue = this; !queue.isEmpty(); queue = queue.deleteMin()) {\n+            results = results.prepend(queue.findMin());\n+        }\n+        return results.reverse();\n+    }\n+\n+    /**\n+     * Removes an element from this Queue.\n+     *\n+     * @return a tuple containing the first element and the remaining elements of this Queue\n+     * @throws NoSuchElementException if this Queue is empty\n+     */\n+    @Override\n+    Tuple2<T, PriorityQueue<T>> dequeue() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Enqueues a new element.\n+     *\n+     * @param element The new element\n+     * @return a new {@code Queue} instance, containing the new element\n+     */\n+    @Override\n+    public PriorityQueue<T> enqueue(T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> append(T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> appendAll(Iterable<? extends T> elements) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<? extends LinearSeq<T>> combinations() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<? extends LinearSeq<T>> combinations(int k) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public Iterator<? extends LinearSeq<T>> crossProduct(int power) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Returns the element at the specified index.\n+     *\n+     * @param index an index\n+     * @return the element at the given index\n+     * @throws IndexOutOfBoundsException if this is empty, index &lt; 0 or index &gt;= length()\n+     */\n+    @Override\n+    public T get(int index) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Returns the index of the first occurrence of the given element after or at some start index\n+     * or -1 if this does not contain the given element.\n+     *\n+     * @param element an element\n+     * @param from    start index\n+     * @return the index of the first occurrence of the given element\n+     */\n+    @Override\n+    public int indexOf(T element, int from) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> distinct() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> distinctBy(Comparator<? super T> comparator) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<T> distinctBy(Function<? super T, ? extends U> keyExtractor) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> drop(long n) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> dropRight(long n) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> dropUntil(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> dropWhile(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> filter(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<U> flatMap(Function<? super T, ? extends Iterable<? extends U>> mapper) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <C> Map<C, ? extends LinearSeq<T>> groupBy(Function<? super T, ? extends C> classifier) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public Iterator<? extends LinearSeq<T>> grouped(long size) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Checks if this Traversable is known to have a finite size.\n+     * <p>\n+     * This method should be implemented by classes only, i.e. not by interfaces.\n+     *\n+     * @return true, if this Traversable is known to hafe a finite size, false otherwise.\n+     */\n+    @Override\n+    public boolean hasDefiniteSize() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Returns the first element of a non-empty Traversable.\n+     *\n+     * @return The first element of this Traversable.\n+     * @throws NoSuchElementException if this is empty\n+     */\n+    @Override\n+    public T head() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Dual of {@linkplain #tail()}, returning all elements except the last.\n+     *\n+     * @return a new instance containing all elements except the last.\n+     * @throws UnsupportedOperationException if this is empty\n+     */\n+    @Override\n+    public PriorityQueue<T> init() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Checks if this Traversable can be repeatedly traversed.\n+     * <p>\n+     * This method should be implemented by classes only, i.e. not by interfaces.\n+     *\n+     * @return true, if this Traversable is known to be traversable repeatedly, false otherwise.\n+     */\n+    @Override\n+    public boolean isTraversableAgain() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Computes the number of elements of this Traversable.\n+     * <p>\n+     * Same as {@link #size()}.\n+     *\n+     * @return the number of elements\n+     */\n+    @Override\n+    public int length() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> insert(int index, T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> insertAll(int index, Iterable<? extends T> elements) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> intersperse(T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Returns the index of the last occurrence of the given element before or at a given end index\n+     * or -1 if this does not contain the given element.\n+     *\n+     * @param element an element\n+     * @param end     the end index\n+     * @return the index of the last occurrence of the given element\n+     */\n+    @Override\n+    public int lastIndexOf(T element, int end) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<U> map(Function<? super T, ? extends U> mapper) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> padTo(int length, T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * A copy of this sequence with an element prepended until a given target length is reached.\n+     * <p>\n+     * Note: lazily-evaluated Seq implementations need to process all elements in order to gather the overall length.\n+     *\n+     * @param length  the target length\n+     * @param element the padding element\n+     * @return a new sequence consisting of all elements of this sequence prepended by the minimal number\n+     * of occurrences of <code>element</code> so that the resulting sequence has a length of at least <code>length</code>.\n+     */\n+    @Override\n+    public Seq<T> leftPadTo(int length, T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> patch(int from, Iterable<? extends T> that, int replaced) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public Tuple2<? extends LinearSeq<T>, ? extends LinearSeq<T>> partition(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> peek(Consumer<? super T> action) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<? extends LinearSeq<T>> permutations() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> prepend(T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> prependAll(Iterable<? extends T> elements) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> remove(T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> removeFirst(Predicate<T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> removeLast(Predicate<T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> removeAt(int index) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> removeAll(T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> removeAll(Iterable<? extends T> elements) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> replace(T currentElement, T newElement) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> replaceAll(T currentElement, T newElement) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> retainAll(Iterable<? extends T> elements) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> reverse() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> scan(T zero, BiFunction<? super T, ? super T, ? extends T> operation) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<U> scanLeft(U zero, BiFunction<? super U, ? super T, ? extends U> operation) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<U> scanRight(U zero, BiFunction<? super T, ? super U, ? extends U> operation) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> slice(long beginIndex, long endIndex) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public Iterator<? extends LinearSeq<T>> sliding(long size) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public Iterator<? extends LinearSeq<T>> sliding(long size, long step) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> sorted() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> sorted(Comparator<? super T> comparator) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U extends Comparable<? super U>> LinearSeq<T> sortBy(Function<? super T, ? extends U> mapper) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<T> sortBy(Comparator<? super U> comparator, Function<? super T, ? extends U> mapper) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Splits a Seq at the specified index. The result of {@code splitAt(n)} is equivalent to\n+     * {@code Tuple.of(take(n), drop(n))}.\n+     *\n+     * @param n An index.\n+     * @return A Tuple containing the first n and the remaining elements.\n+     */\n+    @Override\n+    public Tuple2<? extends Seq<T>, ? extends Seq<T>> splitAt(long n) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Splits a sequence at the first element which satisfies the {@link Predicate}, e.g. Tuple(init, element+tail).\n+     *\n+     * @param predicate An predicate\n+     * @return A {@link Tuple} containing divided sequences\n+     */\n+    @Override\n+    public Tuple2<? extends Seq<T>, ? extends Seq<T>> splitAt(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    /**\n+     * Splits a sequence at the first element which satisfies the {@link Predicate}, e.g. Tuple(init+element, tail).\n+     *\n+     * @param predicate An predicate\n+     * @return A {@link Tuple} containing divided sequences\n+     */\n+    @Override\n+    public Tuple2<? extends Seq<T>, ? extends Seq<T>> splitAtInclusive(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public Tuple2<? extends LinearSeq<T>, ? extends LinearSeq<T>> span(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> subSequence(int beginIndex) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> subSequence(int beginIndex, int endIndex) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> tail() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public Option<? extends LinearSeq<T>> tailOption() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> take(long n) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> takeRight(long n) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> takeUntil(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> takeWhile(Predicate<? super T> predicate) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<U> unit(Iterable<? extends U> iterable) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <T1, T2> Tuple2<? extends LinearSeq<T1>, ? extends LinearSeq<T2>> unzip(Function<? super T, Tuple2<? extends T1, ? extends T2>> unzipper) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <T1, T2, T3> Tuple3<? extends Seq<T1>, ? extends Seq<T2>, ? extends Seq<T3>> unzip3(Function<? super T, Tuple3<? extends T1, ? extends T2, ? extends T3>> unzipper) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<T> update(int index, T element) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<Tuple2<T, U>> zip(Iterable<? extends U> that) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public <U> LinearSeq<Tuple2<T, U>> zipAll(Iterable<? extends U> that, T thisElem, U thatElem) {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public LinearSeq<Tuple2<T, Long>> zipWithIndex() {\n+        throw new UnsupportedOperationException();\n+    }\n+\n+    @Override\n+    public boolean equals(Object o) {\n+        if (o == this) {\n+            return true;\n+        } else if (o instanceof PriorityQueue) {\n+            final PriorityQueue<?> that = (PriorityQueue<?>) o;\n+            return this.toList().equals(that.toList());\n+        } else {\n+            return false;\n+        }\n+    }\n+\n+    @Override\n+    public int hashCode() {\n+        return toList().hashCode();","path":"javaslang/src/main/java/javaslang/collection/PriorityQueue.java","position":550,"original_position":584,"commit_id":"d8354bb155ecc21a97309310fbb162eaf686266f","original_commit_id":"3a44500aef868bde7e6ad8ea4a85c9dbafd4b958","user":{"login":"danieldietrich","id":743833,"avatar_url":"https://avatars.githubusercontent.com/u/743833?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldietrich","html_url":"https://github.com/danieldietrich","followers_url":"https://api.github.com/users/danieldietrich/followers","following_url":"https://api.github.com/users/danieldietrich/following{/other_user}","gists_url":"https://api.github.com/users/danieldietrich/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldietrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldietrich/subscriptions","organizations_url":"https://api.github.com/users/danieldietrich/orgs","repos_url":"https://api.github.com/users/danieldietrich/repos","events_url":"https://api.github.com/users/danieldietrich/events{/privacy}","received_events_url":"https://api.github.com/users/danieldietrich/received_events","type":"User","site_admin":false},"body":"Scala does not cache it. I question if hashCode is needed at all in multi-valued classes. How often did you use a PriorityQueue (or other collections that contain many elements) as key in a HashMap? We decided not to do that optimization for now.","created_at":"2016-04-30T21:33:28Z","updated_at":"2016-04-30T21:33:28Z","html_url":"https://github.com/javaslang/javaslang/pull/1300#discussion_r61675716","pull_request_url":"https://api.github.com/repos/javaslang/javaslang/pulls/1300","_links":{"self":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/comments/61675716"},"html":{"href":"https://github.com/javaslang/javaslang/pull/1300#discussion_r61675716"},"pull_request":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/1300"}}},"pull_request":{"url":"https://api.github.com/repos/javaslang/javaslang/pulls/1300","id":67890867,"html_url":"https://github.com/javaslang/javaslang/pull/1300","diff_url":"https://github.com/javaslang/javaslang/pull/1300.diff","patch_url":"https://github.com/javaslang/javaslang/pull/1300.patch","issue_url":"https://api.github.com/repos/javaslang/javaslang/issues/1300","number":1300,"state":"open","locked":false,"title":"Added persistent `PriorityQueue` implementation","user":{"login":"paplorinc","id":1841944,"avatar_url":"https://avatars.githubusercontent.com/u/1841944?v=3","gravatar_id":"","url":"https://api.github.com/users/paplorinc","html_url":"https://github.com/paplorinc","followers_url":"https://api.github.com/users/paplorinc/followers","following_url":"https://api.github.com/users/paplorinc/following{/other_user}","gists_url":"https://api.github.com/users/paplorinc/gists{/gist_id}","starred_url":"https://api.github.com/users/paplorinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paplorinc/subscriptions","organizations_url":"https://api.github.com/users/paplorinc/orgs","repos_url":"https://api.github.com/users/paplorinc/repos","events_url":"https://api.github.com/users/paplorinc/events{/privacy}","received_events_url":"https://api.github.com/users/paplorinc/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/javaslang/javaslang/issues/1264\r\n\r\nTODO:\r\n* Understand what I just implemented :p\r\n * http://www.brics.dk/RS/96/37/BRICS-RS-96-37.pdf\r\n * https://en.wikipedia.org/wiki/Binomial_heap\r\n * http://scalaz.github.io/scalaz/scalaz-2.9.1-6.0.2/doc.sxr/scalaz/Heap.scala.html\r\n * https://github.com/ruippeixotog/functional-brodal-queues/blob/master/src/main/scala/net/ruippeixotog/structs/SkewBinomialQueue.scala\r\n * http://scottlobdell.me/2016/04/purely-functional-data-structures-python\r\n* ~~Implement missing (inherited) methods~~\r\n * ~~Make size `O(1)`~~\r\n  * ~~add `merge` method~~\r\n  * ~~implement `enqueueAll` as a merge~~\r\n* ~~Write comprehensive tests for existing functionality~~\r\n * fix tests for:\r\n    * ~~`(de)serialization`~~\r\n    * ~~`non-comparable`~~\r\n    * ~~exeptions thrown by `empty`~~\r\n    * ~~`spliterator`~~\r\n* ~~Refactor everything to be more digestible and further from the original paper and Scalaz structure~~\r\n* ~~add realistic `JMH` benchmark (e.g. sorting numbers) and compare it with the `Java` impl~~\r\n * ~~compare against `ScalaZ`~~ (anybody else implemented it? `Clojure` didn't, `Kotlin` didn't ...)\r\n* Add proper documentation","created_at":"2016-04-26T14:01:22Z","updated_at":"2016-04-30T21:33:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0758954b9f0655f1c4e01f396c515f0471463a9c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/javaslang/javaslang/pulls/1300/commits","review_comments_url":"https://api.github.com/repos/javaslang/javaslang/pulls/1300/comments","review_comment_url":"https://api.github.com/repos/javaslang/javaslang/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javaslang/javaslang/issues/1300/comments","statuses_url":"https://api.github.com/repos/javaslang/javaslang/statuses/d8354bb155ecc21a97309310fbb162eaf686266f","head":{"label":"paplorinc:PriorityQueue","ref":"PriorityQueue","sha":"d8354bb155ecc21a97309310fbb162eaf686266f","user":{"login":"paplorinc","id":1841944,"avatar_url":"https://avatars.githubusercontent.com/u/1841944?v=3","gravatar_id":"","url":"https://api.github.com/users/paplorinc","html_url":"https://github.com/paplorinc","followers_url":"https://api.github.com/users/paplorinc/followers","following_url":"https://api.github.com/users/paplorinc/following{/other_user}","gists_url":"https://api.github.com/users/paplorinc/gists{/gist_id}","starred_url":"https://api.github.com/users/paplorinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paplorinc/subscriptions","organizations_url":"https://api.github.com/users/paplorinc/orgs","repos_url":"https://api.github.com/users/paplorinc/repos","events_url":"https://api.github.com/users/paplorinc/events{/privacy}","received_events_url":"https://api.github.com/users/paplorinc/received_events","type":"User","site_admin":false},"repo":{"id":55842829,"name":"javaslang","full_name":"paplorinc/javaslang","owner":{"login":"paplorinc","id":1841944,"avatar_url":"https://avatars.githubusercontent.com/u/1841944?v=3","gravatar_id":"","url":"https://api.github.com/users/paplorinc","html_url":"https://github.com/paplorinc","followers_url":"https://api.github.com/users/paplorinc/followers","following_url":"https://api.github.com/users/paplorinc/following{/other_user}","gists_url":"https://api.github.com/users/paplorinc/gists{/gist_id}","starred_url":"https://api.github.com/users/paplorinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paplorinc/subscriptions","organizations_url":"https://api.github.com/users/paplorinc/orgs","repos_url":"https://api.github.com/users/paplorinc/repos","events_url":"https://api.github.com/users/paplorinc/events{/privacy}","received_events_url":"https://api.github.com/users/paplorinc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paplorinc/javaslang","description":"A functional library for Java 8+ that provides persistent data types and functional control structures.","fork":true,"url":"https://api.github.com/repos/paplorinc/javaslang","forks_url":"https://api.github.com/repos/paplorinc/javaslang/forks","keys_url":"https://api.github.com/repos/paplorinc/javaslang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paplorinc/javaslang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paplorinc/javaslang/teams","hooks_url":"https://api.github.com/repos/paplorinc/javaslang/hooks","issue_events_url":"https://api.github.com/repos/paplorinc/javaslang/issues/events{/number}","events_url":"https://api.github.com/repos/paplorinc/javaslang/events","assignees_url":"https://api.github.com/repos/paplorinc/javaslang/assignees{/user}","branches_url":"https://api.github.com/repos/paplorinc/javaslang/branches{/branch}","tags_url":"https://api.github.com/repos/paplorinc/javaslang/tags","blobs_url":"https://api.github.com/repos/paplorinc/javaslang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paplorinc/javaslang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paplorinc/javaslang/git/refs{/sha}","trees_url":"https://api.github.com/repos/paplorinc/javaslang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paplorinc/javaslang/statuses/{sha}","languages_url":"https://api.github.com/repos/paplorinc/javaslang/languages","stargazers_url":"https://api.github.com/repos/paplorinc/javaslang/stargazers","contributors_url":"https://api.github.com/repos/paplorinc/javaslang/contributors","subscribers_url":"https://api.github.com/repos/paplorinc/javaslang/subscribers","subscription_url":"https://api.github.com/repos/paplorinc/javaslang/subscription","commits_url":"https://api.github.com/repos/paplorinc/javaslang/commits{/sha}","git_commits_url":"https://api.github.com/repos/paplorinc/javaslang/git/commits{/sha}","comments_url":"https://api.github.com/repos/paplorinc/javaslang/comments{/number}","issue_comment_url":"https://api.github.com/repos/paplorinc/javaslang/issues/comments{/number}","contents_url":"https://api.github.com/repos/paplorinc/javaslang/contents/{+path}","compare_url":"https://api.github.com/repos/paplorinc/javaslang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paplorinc/javaslang/merges","archive_url":"https://api.github.com/repos/paplorinc/javaslang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paplorinc/javaslang/downloads","issues_url":"https://api.github.com/repos/paplorinc/javaslang/issues{/number}","pulls_url":"https://api.github.com/repos/paplorinc/javaslang/pulls{/number}","milestones_url":"https://api.github.com/repos/paplorinc/javaslang/milestones{/number}","notifications_url":"https://api.github.com/repos/paplorinc/javaslang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paplorinc/javaslang/labels{/name}","releases_url":"https://api.github.com/repos/paplorinc/javaslang/releases{/id}","deployments_url":"https://api.github.com/repos/paplorinc/javaslang/deployments","created_at":"2016-04-09T12:20:36Z","updated_at":"2016-04-09T12:20:39Z","pushed_at":"2016-04-30T19:53:26Z","git_url":"git://github.com/paplorinc/javaslang.git","ssh_url":"git@github.com:paplorinc/javaslang.git","clone_url":"https://github.com/paplorinc/javaslang.git","svn_url":"https://github.com/paplorinc/javaslang","homepage":"http://javaslang.io","size":11007,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"javaslang:master","ref":"master","sha":"b6dc352d8b67601c315db151ac4b45fc21806072","user":{"login":"javaslang","id":5786132,"avatar_url":"https://avatars.githubusercontent.com/u/5786132?v=3","gravatar_id":"","url":"https://api.github.com/users/javaslang","html_url":"https://github.com/javaslang","followers_url":"https://api.github.com/users/javaslang/followers","following_url":"https://api.github.com/users/javaslang/following{/other_user}","gists_url":"https://api.github.com/users/javaslang/gists{/gist_id}","starred_url":"https://api.github.com/users/javaslang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javaslang/subscriptions","organizations_url":"https://api.github.com/users/javaslang/orgs","repos_url":"https://api.github.com/users/javaslang/repos","events_url":"https://api.github.com/users/javaslang/events{/privacy}","received_events_url":"https://api.github.com/users/javaslang/received_events","type":"Organization","site_admin":false},"repo":{"id":16378879,"name":"javaslang","full_name":"javaslang/javaslang","owner":{"login":"javaslang","id":5786132,"avatar_url":"https://avatars.githubusercontent.com/u/5786132?v=3","gravatar_id":"","url":"https://api.github.com/users/javaslang","html_url":"https://github.com/javaslang","followers_url":"https://api.github.com/users/javaslang/followers","following_url":"https://api.github.com/users/javaslang/following{/other_user}","gists_url":"https://api.github.com/users/javaslang/gists{/gist_id}","starred_url":"https://api.github.com/users/javaslang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javaslang/subscriptions","organizations_url":"https://api.github.com/users/javaslang/orgs","repos_url":"https://api.github.com/users/javaslang/repos","events_url":"https://api.github.com/users/javaslang/events{/privacy}","received_events_url":"https://api.github.com/users/javaslang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/javaslang/javaslang","description":"A functional library for Java 8+ that provides persistent data types and functional control structures.","fork":false,"url":"https://api.github.com/repos/javaslang/javaslang","forks_url":"https://api.github.com/repos/javaslang/javaslang/forks","keys_url":"https://api.github.com/repos/javaslang/javaslang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javaslang/javaslang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javaslang/javaslang/teams","hooks_url":"https://api.github.com/repos/javaslang/javaslang/hooks","issue_events_url":"https://api.github.com/repos/javaslang/javaslang/issues/events{/number}","events_url":"https://api.github.com/repos/javaslang/javaslang/events","assignees_url":"https://api.github.com/repos/javaslang/javaslang/assignees{/user}","branches_url":"https://api.github.com/repos/javaslang/javaslang/branches{/branch}","tags_url":"https://api.github.com/repos/javaslang/javaslang/tags","blobs_url":"https://api.github.com/repos/javaslang/javaslang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javaslang/javaslang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javaslang/javaslang/git/refs{/sha}","trees_url":"https://api.github.com/repos/javaslang/javaslang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javaslang/javaslang/statuses/{sha}","languages_url":"https://api.github.com/repos/javaslang/javaslang/languages","stargazers_url":"https://api.github.com/repos/javaslang/javaslang/stargazers","contributors_url":"https://api.github.com/repos/javaslang/javaslang/contributors","subscribers_url":"https://api.github.com/repos/javaslang/javaslang/subscribers","subscription_url":"https://api.github.com/repos/javaslang/javaslang/subscription","commits_url":"https://api.github.com/repos/javaslang/javaslang/commits{/sha}","git_commits_url":"https://api.github.com/repos/javaslang/javaslang/git/commits{/sha}","comments_url":"https://api.github.com/repos/javaslang/javaslang/comments{/number}","issue_comment_url":"https://api.github.com/repos/javaslang/javaslang/issues/comments{/number}","contents_url":"https://api.github.com/repos/javaslang/javaslang/contents/{+path}","compare_url":"https://api.github.com/repos/javaslang/javaslang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javaslang/javaslang/merges","archive_url":"https://api.github.com/repos/javaslang/javaslang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javaslang/javaslang/downloads","issues_url":"https://api.github.com/repos/javaslang/javaslang/issues{/number}","pulls_url":"https://api.github.com/repos/javaslang/javaslang/pulls{/number}","milestones_url":"https://api.github.com/repos/javaslang/javaslang/milestones{/number}","notifications_url":"https://api.github.com/repos/javaslang/javaslang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javaslang/javaslang/labels{/name}","releases_url":"https://api.github.com/repos/javaslang/javaslang/releases{/id}","deployments_url":"https://api.github.com/repos/javaslang/javaslang/deployments","created_at":"2014-01-30T14:07:25Z","updated_at":"2016-04-30T04:13:01Z","pushed_at":"2016-04-30T20:42:14Z","git_url":"git://github.com/javaslang/javaslang.git","ssh_url":"git@github.com:javaslang/javaslang.git","clone_url":"https://github.com/javaslang/javaslang.git","svn_url":"https://github.com/javaslang/javaslang","homepage":"http://javaslang.io","size":11086,"stargazers_count":846,"watchers_count":846,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"open_issues_count":74,"forks":102,"open_issues":74,"watchers":846,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/1300"},"html":{"href":"https://github.com/javaslang/javaslang/pull/1300"},"issue":{"href":"https://api.github.com/repos/javaslang/javaslang/issues/1300"},"comments":{"href":"https://api.github.com/repos/javaslang/javaslang/issues/1300/comments"},"review_comments":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/1300/comments"},"review_comment":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/1300/commits"},"statuses":{"href":"https://api.github.com/repos/javaslang/javaslang/statuses/d8354bb155ecc21a97309310fbb162eaf686266f"}}}}