LoginSignup
1
1

More than 5 years have passed since last update.

1つの Applicative フィールド値を複数の場所で使いまわす

Posted at

例:1つのテキストフィールドの値を1,2,3文字目からなるタプルに変換

sampleForm :: Form (Char, Char, Char)
sampleForm = renderDivs $ ((,,)
    <$> (!! 0) . unpack
    <*> (!! 1) . unpack
    <*> (!! 2) . unpack
    ) <$> areq textField "text" Nothing
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1