KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
L
★ 11
Open GitHub ↗
Simple set notation in Kotlin
Download README (.md)
Explore Similar Repositories
acidcam-cli
:
Command line tool for classic Acid Cam filters for Unix
NodeUML
:
UML tool for Unity3d (aka Unity)
DL
:
TensorFlow,DCGAN,VAE,LSTM,CNN,Acoustic Scene Classification
wifi-ap-positioning
:
An indoor positioning system running on WiFi access points.
pyQtNumSim
:
A Qt interface for verbose numerical methods assignments.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
L
?
Download (.md)
# L ## Simple set notation in Kotlin Inspired by [medium post](https://medium.com/@farolfo/list-comprehensions-in-java-230e6a9d3a0c) ## Usage ### basic usage  ```kotlin listOf(1,2,3,4).L().cond { it%2==0 }.get() ``` ### with two list  ```kotlin val intList1 = listOf(1, 2, 3) val intList2 = listOf(4, 5, 6) listOf(1, 2, 3).L(CartesianZipper()).with(listOf(4, 5, 6).cond { x, y -> x * 2 == y }.get() ``` ### and many more ```kotlin val intList1 = listOf(1, 3, 2) val intList2 = listOf(4, 6, 5) val intList3 = listOf(11, 13, 12) val l3 = intList1.L(CartesianZipper()).with(intList2).with(intList3) .cond { _, y, z -> y * 2 == z } .cond { x, _, _ -> x > 2 } .get() // [(3, 6, 12)] ```