3 ms·
I think you got the Haskell issue right there.
by walkingolof 10y ago
I think you got the Haskell issue right there.
- catnaroek 10y agoMathematical functions are taught in school. That function composition is associative and every set has an identity function, this is stuff that every high school graduate should know. --- Reply to montatonic here: I'm neither a Haskeller nor do I want to see Haskell “take over” the world. Some of my comments even got lots of downvotes from Haskellers. --- Reply to sidlls here: Yes, FWIW, I don't really agree with the use of the term “endomorphism”. It isn't even precise: the type `Endo` is inhabited by endomorphisms is one specific category (Hask), not endomorphisms in arbitrary categories. So “endofunction” would be both more accurate and less pompous. As for “codomain”, I can't agree, though. This is really high school stuff.
- montanonic 10y agoHow to take over the world as a programming language community: Neophyte: Hello, I do not understand this. Haskeller: You should already know this.
- dllthomas 10y agoThat's been very far from my experience, when learning Haskell or teaching it. And as mentioned in the comment, the parent poster is not "a Haskeller".
- sidlls 10y agoThe jargon "monomorphism", "codomain", "endomorphism" and even "function" and "domain" as it truly applies here are most certainly not taught even as part of a typical high-school calculus program. I can't speak for IB (they only offered AP when I was in high school, so long ago). The basic, hand-wavy version ("a function maps a domain to a range") is about as complicated and deep as it gets.
- codygman 10y agoHigh schools taught calculus outside of honors programs? My high school only went to algebra 1.5
- sidlls 10y agoMost high schools in my district, even the ones serving poor neighborhoods, taught at least through Trig/Algebra 2. Calculus was AP Calculus only (which one didn't have to be in an "honors" program to take).
- dllthomas 10y agoMy recollection has "function", "domain", and "codomain" (though called "range") as part of Algebra 2, though it's been a while.
- catnaroek 10y agoNo, the range is in general a (possibly strict) subset of the codomain. In a typed setting, the codomain is the more natural notion. For example: twice :: Integer -> Integer twice = (2*) Here, `twice`'s range contains just the even integers.
- dllthomas 10y agoPer Wikipedia, range is sometimes used for image (as you say) and sometimes used for codomain. That said, image probably is closer to the use in question.
- pimlottc 10y agoThat matches my experience. I was familiar with domain and range; this thread is the first time I've heard the term "codomain".
- codygman 10y ago> Mathematical functions are taught in school. That function composition is associative and every set has an identity function, this is stuff that every high school graduate should know. As a haskeller myself I wholeheartedly disagree. I knew nothing of function composition until Haskell. I only heard about functions in high school once my senior year and it was very basic. Admittedly I went to high school in rural Texas. I also never heard about sets, the word I was never used in my high school math classes. > this is stuff that every high school graduate should know. You seem to have a lot of faith in the lowest common denominator of high school graduates and I think it does you a disservice in being able to help others learn these topics. I sense my last paragraph might have sounded a bit... Aggressive? That's not my intention. P.S. I still don't really know what domain and codomain mean :)
- catnaroek 10y ago> You seem to have a lot of faith in the lowest common denominator of high school graduates If the material is taught in high school, then educators must have decided that high schoolers can learn it, right? > I still don't really know what domain and codomain mean :) someFunction :: Domain -> Codomain
- codygman 10y ago> If the material is taught in high school, then educators must have decided that high schoolers can learn it, right? Did you miss that I said it wasn't taught in my school?
- catnaroek 10y agoErrr, what I meant is “if there exist high schools that teach this material (not necessarily yours), then there exist educators who think high schoolers can learn it”.
- deleted 10y ago[deleted]