xantier / kollections Goto Github PK
View Code? Open in Web Editor NEWA primer and a cheat sheet for Kotlin collection extension functions
Home Page: http://jussi.hallila.com/Kollections/
A primer and a cheat sheet for Kotlin collection extension functions
Home Page: http://jussi.hallila.com/Kollections/
From email:
"Hey Jussi,
I was going to make a pull request to fix this but didn't have access permissions. I'm not sure if this was true with older versions of Kotlin, but Kotlin as of now has the partition function put values matching the predicate on the left side, not the right side.
This cheat sheet is great BTW! Thanks for putting it together!
"
It would be great if the pdf could be landscape oriented to have fewer wraps/linebreaks.
fun <T> Iterable<T>.chunked(size: Int): List<List<T>>
Splits this collection into a list of lists each not exceeding the given size.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/chunked.html
The examples of the contains
operator are not idiomatic since they use its method form instead of its operator form:
# Checks and Actions
## Contains
// Not idiomatic
intList.contains(3)
// Is idiomatic
3 in intList
I think the sheet will greatly benefit from replacing the methods with operators.
All fold* and reduce examples are incorrect because arguments are flipped. The accumulator always comes last.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.