Closed Cotel closed 7 years ago
@Cotel this needs test
Also you can see the explanation of Option by Raul Raja
https://www.youtube.com/watch?v=cnOA7HdNUR4&index=2&list=PLKxa4AIfm4pUaVhRKxYErhAvjU9xqwZOb
I would be very pleased if you all understood this Monad. Real Magic is happening here folks!
I recommend you to see the evolution of the code (there are only 2 commits) because last refactor can be scary but it's not, believe me 😉
I want to have a look tomorrow! We should start with basic functions!
This resolve #26
While I was making the main example, @Nhemesy proposed me to use nullables and a great discussion appeared. Maybe monad offer us a really safe way to operate with variables but it can be confusing and too big. On the other hand, Kotlin nullables increase the safety of the code and they are way lesser code but at the end they can be null too.
Take a look at
Main.kt
and let's discuss which way to operate is better.