mikesol / deku-documentation

Documentation for the purescript-deku project
https://deku-documentation.vercel.app
Other
9 stars 5 forks source link

Simplify examples #1

Closed Neppord closed 1 year ago

Neppord commented 1 year ago

This PR mainly extracts lambdas that takes more then one argument as a pair, and instead of constructing the arrays of pairs and later mapping over that them the code now calls the function instead of where the pair operator was used.

This hopefully does two things:

let button setter letter value = D.button (klass buttonClass <|> click (setter value)) [ text (letter <> " = " <> show value) ] D.div [ D.div_ $ [ button setP "P" true , button setP "P" false , button setQ "Q" true , button setQ "Q" false ]