Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8626055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:55:55+00:00 2026-06-12T07:55:55+00:00

I defined an AVL tree as such, with ‘a -> ‘a -> int being

  • 0

I defined an AVL tree as such, with ‘a -> ‘a -> int being the comparison function

type 'a t = Empty of ('a -> 'a -> int)
  | Node of 'a * 'a t * 'a t * ('a -> 'a -> int)

I’m trying to use this AVL module to implement a priority queue in a separate module.

type 'a t = Queue of (Avl.t * int)

But when I try to compile I get this error:

 Error: The type constructor Avl.t expects 1 argument(s),
   but is here applied to 0 argument(s)

What argument is it talking about and what’s should the syntax be in the queue type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:55:56+00:00Added an answer on June 12, 2026 at 7:55 am

    Your AVL tree is parameterized by the type in the nodes ('a). So you should be able to say

    type 'a t = Queue of ('a Avl.t * int)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Everytime I use this my avlRotate function, it drops some elements from the tree.
I defined a webpage to use iso-8859-1 like the following: <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
I defined a function to return Fibonacci stream as follows: def fib:Stream[Int] = {
i defined my own 24 bit data type like this class _24bit{ public byte[]
I defined a class named nth_best_parse this way: class nth_best_parse { public: int traversal;
Having defined type MyInt int I would like to define a method .ShowMe() that
I´ve defined a class like this: function Class1(){ function Func1(){ /* Methods and vars
I defined this multi dimensional array in C#: int[,] values = new int[,] {
I am implementing an AVL tree and trying to understand how template works so
I defined this editorTemplate to modify the behaviour of a boolean type, my problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.