[Haskell-cafe] Implementing parental using blood type

José A. Romero L. escherdragon at gmail.com
Sun Jun 29 18:42:02 UTC 2014


To solve the specific problem you pose, one doesn't need to know anything
about the relationship between alleles and blood types -- you don't even
need to know what an allele is :-)

If I didn't need to do anything else than just calculate whether a given
father's blood type is 'viable', I'd rather go for something like the
solution in attachment. I took advantage of this handy calculator
<http://www.endmemo.com/medical/bloodtype.php> while writing it.

Cheers,


On Sun, Jun 29, 2014 at 4:16 AM, Rafael Almeida <almeidaraf at gmail.com>
wrote:

> Hello,
>
> I'm trying to practice my Haskell. So I had the idea of making a program
> which, given a mother's and a child blood type, it can determine whether a
> certain father is possible or not.
>
> Please take a look on this gist with my implementation:
>
>
> https://gist.github.com/aflag/14429dfb2e89791a44e2#file-parentaltesting
>
> Would you care to comment on it? It looks a bit cumbersome to my eyes. I'm
> trying to find the most intuitive and elegant way of do it. I'm not so much
> worried with performance.
>
> []'s
> Rafael
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


-- 
José A. Romero L.
escherdragon at gmail.com
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140629/4157a462/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Blood.hs
Type: text/x-haskell
Size: 590 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140629/4157a462/attachment.hs>


More information about the Haskell-Cafe mailing list