Kind Basics

Types, Functions and Theorems are the fundamentals of Kind.

The basics of Kind language are:

  • Types
  • Functions
  • Theorems

But first, let's take a look and get comfortable with the first two. Theorems is a more complicated subject and will be explained later in this book.

By working with basic functions and types in this segment, you'll know and have a better understating of the Kind syntax and how it works.

Comments

Throughout this book, you will notice that sometimes there is a "double slash" // followed by a code or a text. This double slash is used to tell the compiler that EVERYTHING that comes after it, in that specific line, will be seen as a comment. So the compiler does not read those comments.

Comments are generally used to describe the functionality of a function, but you can use it to write whatever you want in how many lines you desire as long as you remember to use "//" in each line.

For example:

//comments.kind2

This is not a comment.

//This is a comment.
 
This code works. // Anything after the double slash, doesn't work anymore.

//This code doesn't work // Neither does this one

This code works. // This code doesn't // Neither does this // Or this

This works too //

So, when you see a // just know that it is a commented code, and everything to the right of the it will not be interpreted by the compiler.

Now that you, fellow Kind Astronaut, know went through all this preparation, our journey has everything to begin!

Let's start by learning what are these so called "Types".

"Types of what?! Fruits?" - Recruit nÂș42.