3 ms·
The type, as a set of nouns, is the range (excuse me, "codomain") of a function. So, if we have another function and we call it with a noun of that type, we kn
by urbit 13y ago
The type, as a set of nouns, is the range (excuse me, "codomain") of a function.
So, if we have another function and we call it with a noun of that type, we know the range of the input, we know the code in the function, we can infer the range of the output. It's not terribly rocket scientific.
- samatman 13y agoThis explanation falls apart for me because the third time you use the word "function", it can refer to either of the two referents you already introduced. I think you're saying a type is the range of inputs to function1 which succeed by not crashing; given function2 and a noun in the type, we may use function1 to infer the range of values which function2 must accept? Maybe?
- urbit 13y agoRange == set of outputs which the function can produce. In any language, a type defines a set of values and some semantics for manipulating those values. It so happens that our way of defining common sets is to build a function whose range is some useful set. Actually any gene (ie, expression) has a product range. It doesn't even need to be a function. So the range of the constant [%foo %bar] whatever the subject is, is always [%foo %bar], ie, the pair [7.303.014 7.496.034].
- samatman 13y agoOutputs indeed. I forgot your country willingness to 'normalize' input. I suppose a bull can be a steer if you're willing to cut the balls off on the way into the pen. You're not a big believer in airbags, are ya.
- urbit 13y agoAn automatic castrator is an excellent safety device for your steer pen. Generally we don't actually use these functions unless we're normalizing foreign data. Then, we do. Because anyone on the Internets can send a bull into your steer pen...
- samatman 13y agoI guess I'm hoping there's some snipping noise that lets one distinguish the two cases.
- offensivehandle 13y agoRange is used to mean either codomain or image. You appear to have meant image. Mathematicians keep all three words around because each of them has its use.
- urbit 13y agoOh, fine. Actually I mean codomain, because it's a conservative algorithm...