[Haskell-beginners] Using a concept from Category Theory to enable you to come back home after your function has taken you somewhere
Costello, Roger L.
costello at mitre.org
Sat Aug 4 19:59:59 CEST 2012
Hi Miguel,
First note that I am very much a beginner at Category Theory. I am just sharing what I learn.
> How do you know that a Haskell function is injective? I don't think it's possible to write a function which checks if another function is injective or not .
A function is injective if each input value (domain) yields a different output value (codomain). So if the set of inputs is finite, then it should be possible to write a function that loops over each input value and checks that its output is distinct from all other outputs.
> How to automatically get the inverse of a Haskell function?
That's a great question. I don't know the answer to that. Anyone else have an idea?
/Roger
More information about the Beginners
mailing list