This inductively will define your type, and you basically are defining properties about things with this property. Ninja edit: Think about the the set of natural numbers as 0 and the increment of a natural number. When you're defining functions though, you are explicit, and doing some pretty cool stuff starting with incrementers and 0, you can get addition, subtraction, etc. They could be an integer, a string, doesn't matter. Turns out, we can actually safely drop the parens, because of something called partial function application (Currying), which more or less says that we can take a function that takes multiple parameters and turn it into a bunch of sequential function calls each taking one parameter. If you take two parameters, one of type A, one of type B, and returns a value of type C, it's (A -> B) -> C, but we drop the parens, typically, so it just becomes A -> B -> C. Do you know a programming language? If you have a function that takes one parameter of type A and returns type B, then that's type A -> B. A list of book recommendations from our community for various topics can be found here. If you are new to Computer Science please read our FAQ before posting.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |