Quantcast
Channel: Haskell - data type functions - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Dan D. for Haskell - data type functions

You mean something like:addLengths x y = INCH ((convert x) + (convert y))There might be more parentheses than required.The use of the INCH constructor is not a type cast.

View Article


Haskell - data type functions

I'm learning Haskell and started looking over data types. I tried doing a simple example with converting Yard and feet to inches with a data type defined as LengthUnit. I want to add two LengthUnit...

View Article

Browsing latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>