You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great work again. =) Just wanted to say it'd be sweet if the slice typewriter could support codegen'ing a PriorityQueue implementation too, via the Heap interface:
Although if it's helpful, what I'm really looking to do is something like a "top N by <func>". An ideal implementation would use a heap/priority queue with capacity N, so discard anything ranked lower than N as I iterate over the slice and add things to this heap/priority queue.
Thanks for the consideration!
The text was updated successfully, but these errors were encountered:
Hey there,
Great work again. =) Just wanted to say it'd be sweet if the
slice
typewriter could support codegen'ing aPriorityQueue
implementation too, via theHeap
interface:https://golang.org/pkg/container/heap/ (see
PriorityQueue
example)Although if it's helpful, what I'm really looking to do is something like a "top N by <func>". An ideal implementation would use a heap/priority queue with capacity N, so discard anything ranked lower than N as I iterate over the slice and add things to this heap/priority queue.
Thanks for the consideration!
The text was updated successfully, but these errors were encountered: