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

  • Home
  • SEARCH
  • 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 5961101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:55:05+00:00 2026-05-22T18:55:05+00:00

i went though several Haskell learning examples but i could not figure out how

  • 0

i went though several Haskell learning examples but i could not figure out how to write user defined higher order functions in Haskell

if we are taking a parameter as a function how the type of the function id defined?

  • 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-22T18:55:05+00:00Added an answer on May 22, 2026 at 6:55 pm

    Let’s use the function map as a simple example. map takes a function and a list and applies the function to all elements of the list. If you write the signature of map, it runs like this:

    First, you need a function. Any function is OK, so the type of the first argument is a -> b. Then, you need a list of input values. Since the type of the list’s elements must fit to the function’s input, the type of the list is [a]. For the output: What is the result of a function a -> b when applied to a value of type a? Right, it is b. So the result type is [b]. Assembled together, the type of our function runs like this:

    map :: (a -> b) -> [a] -> [b]
    

    And is defined like this:

    map f []     = []
    map f (x:xs) = f x : map f xs
    

    Does this help you to understand the concept of high order functions?

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

Sidebar

Related Questions

I went through several examples posted online but I cant answer my question. I
I went over many examples of this method and still cant figure out whats
I just went through a bunch of stuff trying to figure out how to
So, I've spend hours on this. I cannot figure it out. I've read several
Ok, this is really really easy, but even though I went through 100s of
I just went through some MVC tutorials after checking this site out for a
I recently started learning Emacs . I went through the tutorial, read some introductory
I downloaded umbraco and used the web platform installer. Everything went though okay and
I am not good enough in CSS coding though good hands on Web application
Sorry for the vague title, but not quite sure how to summarize this one.

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.