   end
 
   defp node_filter(bucket, -1, fun, _) do
-    filter_bucket(bucket, fun)
+    bucket_filter(bucket, fun)
   end
 
   defp node_filter(node, depth, fun, count) when count >= 1 do

  end

  defp set_filter(ordered(bucket: bucket, size: size) = set, fun) do
    {new, removed_count} = filter_bucket(bucket, fun)
    ordered(bucket: new, size: size - removed_count)
  end



  ## Bucket helpers

  defp bucket_filter([e|bucket], fun) do
    case fun.(e) do
      true  ->
        { new, count } = bucket_filter(bucket, fun)
        { [e | new], count }
      false ->
        { new, count } = bucket_filter(bucket, fun)
        { new, count + 1 }
    end
  end

  defp bucket_filter([], fun) do
    {[], 0}
  end

