projects
/
Sone.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Replace new page with Kotlin version
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
utils
/
Iterables.kt
1
package net.pterodactylus.sone.utils
2
3
import com.google.common.base.Optional
4
5
fun <T, R> Iterable<T>.mapPresent(transform: (T) -> Optional<R>): List<R> =
6
map(transform).filter { it.isPresent }.map { it.get() }