Skip to content

Add Profunctor implementation

Compare
Choose a tag to compare
@xaviervia xaviervia released this 10 Aug 20:44
· 74 commits to master since this release

promap can be thought of as a shorthand for doing contramap and map at the same time. The first argument to it is the function that is going to be used to contramap and the second is the one to be used to map:

const Header = Html.Div
  .promap(
    ({title}) => ({children: title}),
    setDisplayName('Header')
  )