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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:48:53+00:00 2026-06-01T07:48:53+00:00

I have a set of five functions, that could be called one of five

  • 0

I have a set of five functions, that could be called one of five ways. I’m expressing that with patern-matching like so,

type Configure = ReaderT Config IO ()
data Step = PreVal
          | PreProc
          | Proc
          | PostProc
          | PostVal

foo :: Step -> Configure
foo PreVal = do some stuff
foo PreProc = do some stuff

and so on bar and baz are set up similarly

I know how to use sequence to call a list of actions. Given a [Step], how could I go about calling [foo,bar,baz]. in sequence, while also calling each possible step.

so it should do this
foo PreVal
foo PreProc
… and so on
bar Preval
bar PreProc
.. and so on
baz …

  • 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-01T07:48:55+00:00Added an answer on June 1, 2026 at 7:48 am
    mapM_ (\ f -> mapM_ f [PreVal, PreProc, Proc, PostProc, PostVal]) [foo, bar, baz]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an app that has five activities. I have one class with functions
I have a set of combo boxes that are driven by five stores and
I have a data set that looks like this Code Product 1 A|B 2
I have a set of five boolean values. If more than one of these
I have set up a sample polyline with five segments , and I'm allowing
i have a question about using GalleryView. At first, i set five default images
I have set the eclipse java formatter to wrap lines that exceed 120 characters
I have set a background on the data-role=page element like so <div data-role=page style=background:
I have a several data sets with 75,000 observations and a type variable that
I have a set of divs eg: <div class=wrapper> <div class=uct_attr data-tags=one two three

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.