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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:31:19+00:00 2026-06-13T23:31:19+00:00

I feel like this should be easier than I’m making it, but I’m having

  • 0

I feel like this should be easier than I’m making it, but I’m having some trouble with this function that should change a set to a list.

fun explode(st(x, xs)) =
    let
        val listTemp = []
    in
        if isEmpty(xs) then listTemp::x else explode(xs)::x
    end
  | explode(nilset) = [];

I’m getting a type clash, saying I’m trying to go from ''a list list to ''a list. Any help would be much appreciated.

edit: said ”a list -> ”a list list… oops.

  • 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-13T23:31:21+00:00Added an answer on June 13, 2026 at 11:31 pm

    The left operand of the :: operator should be an element and the right operand a list. You’re using it with a list as the left operand and an element as the right operand. That’s the type error.

    Assuming the order of the generated list does not matter, you can simply switch the operands. If it does matter, you can still switch the operands and then use List.rev to reverse the resulting list after building the complete list.

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

Sidebar

Related Questions

I feel like this should be obvious to me, but for some reason I
I feel like this should be a no brainer, but clearly I'm missing something...
I feel like this is something I should already know, but I'm just not
Feel like this should be something easy that I'm missing. I have a table
I feel like this should be trivial, but I've struggled to find anything useful
I feel like this should be an easy question, but I can't get it
Yikes .. I feel like this one should be obvious, but I guess I'm
I feel like this should be obvious, and perhaps I'm totally missing something, but
We're using EF 5RC, code first with migrations. I feel like this should be
I feel like this is easy but I am missing something... Using jQuery, I

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.