Skip to content

tonyklawrence/funk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis Build Status Current Release Vesion Maven Central

FunK

FunK, the missing kotlin functions

This small library adds those functions to Kotlin that you are surpised that didn't exist in the first place.

Gradle

compile 'com.tonylawrence:funk:1.2.2'

Maven

<dependency>
    <groupId>com.tonylawrence</groupId>
    <artifactId>funk</artifactId>
    <version>1.2.2</version>
</dependency>

Compose

It is now possible to compose two functions together (assuming that the output / input matches)

f compose g == g ° f

To Option

We can now convert types into optional (nullable) values instead of throwing exception

"10".toIntOption = 10

"foo".toIntOption = null