forM -package:vector-sized

forM is mapM with its arguments flipped. For a version that ignores the results see forM_.
Combinator for the <form> element. Example:
form $ span $ toHtml "foo"
Result:
<form><span>foo</span></form>
Combinator for the form attribute. Example:
div ! form "bar" $ "Hello."
Result:
<div form="bar">Hello.</div>
O(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip mapM.
O(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip mapM.
O(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip mapM.
O(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip mapM.
forM is mapM with its arguments flipped. For a version that ignores its results, see forM_.
Like forM, but applying the function to the individual list items in parallel.
Same as mapM except with arguments flipped.
Special cases, these items occur both as an HTML tag and an HTML attribute. We keep them polymorph.
forM is mapM with its arguments flipped. For a version that ignores the results see forM_.
Whether Prefix, Postfix or Infix
Flipped version of traverse / mapM.
O(n) Apply the monadic action to all elements of the non-empty vector, yielding a non0empty vector of results. Equivalent to flip mapM.
O(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip mapM.
forM is mapM with its arguments flipped. For a version that ignores the results see forM_.
Creates a value of Form with the minimum fields required to make a request. Use one of the following lenses to modify other fields as desired:
Type-safe <form>. Calls (Action id) on submit
formView :: View FormView ()
formView = do
-- create formfields for our form
let f = formFields ContactForm
form ContactForm Submit (gap 10 . pad 10) $ do
el Style.h1 "Add Contact"

-- pass the form field into the field function
field f.name (const id) $ do
label "Contact Name"
input Username (inp . placeholder "contact name")

field f.age (const id) $ do
label "Age"
input Number (inp . placeholder "age" . value "0")

submit Style.btn "Submit"
where
inp = Style.input