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 9302433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:15:18+00:00 2026-06-18T23:15:18+00:00

For my assignment I have to do two functions with the type: wt: trie

  • 0

For my assignment I have to do two functions with the type:

 wt: trie -> (char list list -> ’a)-> ’a
 aw: trie list -> (char list list -> ’a)-> ’a

but what I have is this and was wondering if it was the same thing:

 wt: 'a trie -> ('a list list -> ’a list list)-> ’a list list 
 aw: 'a trie list -> ('a list list -> ’a list list)-> ’a list list

This is my function:

datatype ’a trie = Node of ’a * (’a trie) list | Empty

fun words_in_trie Empty cont = cont [[]]
    | words_in_trie (Node (c, lis)) cont = all_words lis (fn j => map (fn y => [c]@y) j)
  • 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-18T23:15:20+00:00Added an answer on June 18, 2026 at 11:15 pm

    No, those are not the same. For each of them, look at the second parameter, the function. Your assignment says:

    char list list -> 'a
    

    Your version says:

    'a list list -> ’a list list
    

    Okay, so let’s assume that in your function, 'a is char. That means that we can rewrite it to

    char list list -> char list list
    

    Which is different from what the assignment says. Of course, the 'a in the assignment could in theory be a char list list, but when it’s specified as 'a, that probably means that your teachers want it to be generic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Assignment from incompatible pointer type warning I have two structures, one which
This is a school assignment and I have most of it under control, but
(this is indirectly a part of a much larger homework assignment) I have something
I have two basic Cpp tasks, but still I have problems with them. First
I have this block of code (functions omitted as the logic is part of
I have an assignment to implement a Ram-Lak filter, but nearly no information given
I have two tasks for an assignment, one return the number of bits in
I have an assignment that asks to do a number of functions only using
I have an assignment that I need to create a custom C type string
I have this assignment to read, write, enable cookies so that the username will

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.