purescript-foreign icon indicating copy to clipboard operation
purescript-foreign copied to clipboard

Provide an example of using Newtype and Maybe Newtype

Open jbmusso opened this issue 4 years ago • 1 comments

This pull request adds an example of using Newtype as well as Maybe Newtype.

Being relatively new to PureScript, it took me a bit of time to understand what was going on with the nested Except and Maybe functors. The journey taught me a lot however and I believe this example could be helpful to others.

I feel there's something not really idiomatic in using <#> map Email, which initially came up as <#> (<$>) Email while I was figuring out the types and nesting.

I'd happily rename Email and foo, bar, baz, duh to something more meaningful.

jbmusso avatar Nov 07 '19 11:11 jbmusso

error in deps, maybe will work if restarted

srghma avatar Dec 12 '19 16:12 srghma