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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:34:09+00:00 2026-05-29T23:34:09+00:00

Here is my issue: I have two lists as follows: [(Float, Integer)] and [(String,

  • 0

Here is my issue: I have two lists as follows: [(Float, Integer)] and [(String, Integer)]. Now I need to define a function that takes these two Lists and two Float values and returns a list of Strings. The two Float values correspond to a range given (min and max). I have to filter the first list so it only contains elements that are within the min and max range. Then, I need to use the filtered list and take it’s Integer values, match them with the Integer values in the second list and return all the String values that match.

I have already defined a function for use as a filter condition that takes a (Float,Integer) and checks the Float value to see if it is within the given range.

And I have defined a function to take a (String,Integer) element and return the String.

I’m just having problems linking everything together, or maybe I am missing something!

  • 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-05-29T23:34:11+00:00Added an answer on May 29, 2026 at 11:34 pm

    You need (for example, there are different ways)

    integersFromRange :: Float -> Float -> [(Float,Integer)] -> [Integer]
    stringsFromInteger :: Integer -> [(String,Integer)] -> [String]
    

    integersFromRange is basically map snd . filter condition, with condition constructed from the two Floats (you have that). stringsFromInteger could be implemented as map fst . filter condition. Then you combine the functions with

    result = concatMap (`stringsFromInteger` stringList) (integerFromRange mini maxi floatList)
    

    Using a set of Integers instead of a list would be more efficient since membership test in a Set is faster than in a list.

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

Sidebar

Related Questions

I have a function that cycles through two sperate lists and combines them into
What is the issue with this code? Here we have two files: classA.h and
Here's the issue: I have a hook in IE that reacts on WebBrowser.OnNavigateComplete2 event
Here's the issue: I have 2 data contexts that I would like to do
Here's the issue: I have a list of App names that I want to
Having an issue here that I have tried everything I can think of but
now I need help with setting variable. I have two entities Season and Tournament,
So here is the issue, I have 6 divs that are using jQuery UI
So I'm not to OOP in PHP. Here is my issue I have a
I have a rather annoying issue here I can't get my CheckBox CheckedChange event

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.